mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Merge branch 'api-v3' into api-v3-groups
This commit is contained in:
0
.npmignore
Normal file
0
.npmignore
Normal file
@@ -8,7 +8,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
v.memory = 768
|
v.memory = 768
|
||||||
v.cpus = 1
|
v.cpus = 1
|
||||||
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
|
|
||||||
end
|
end
|
||||||
config.vm.box = "thepeopleseason/habitrpg"
|
config.vm.box = "thepeopleseason/habitrpg"
|
||||||
config.ssh.forward_agent = true
|
config.ssh.forward_agent = true
|
||||||
@@ -16,5 +15,5 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.hostname = "habitrpg"
|
config.vm.hostname = "habitrpg"
|
||||||
config.vm.network "forwarded_port", guest: 3000, host: 3000, auto_correct: true
|
config.vm.network "forwarded_port", guest: 3000, host: 3000, auto_correct: true
|
||||||
config.vm.usable_port_range = (3000..3050)
|
config.vm.usable_port_range = (3000..3050)
|
||||||
config.vm.provision :shell, :path => "vagrant.sh"
|
config.vm.provision :shell, :path => "vagrant_scripts/vagrant.sh"
|
||||||
end
|
end
|
||||||
|
|||||||
103
vagrant.sh
103
vagrant.sh
@@ -1,103 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Habitica provisioning script
|
|
||||||
|
|
||||||
# function for autostart
|
|
||||||
function autostart_habitrpg {
|
|
||||||
update_config=$'Please update config.json with your values\nfor ADMIN_EMAIL, SMTP_USER, SMTP_PASS and SMTP_SERVICE,\nthen run "vagrant reload --provision"'
|
|
||||||
|
|
||||||
# check if config.json exists, then check if the defaults are still in place
|
|
||||||
if [ -e config.json ];
|
|
||||||
then
|
|
||||||
if grep -Fq 'ADMIN_EMAIL": "you@yours.com' config.json;
|
|
||||||
then
|
|
||||||
echo "$update_config";
|
|
||||||
exit;
|
|
||||||
else
|
|
||||||
npm start
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
cp config.json.example config.json;
|
|
||||||
echo "$update_config";
|
|
||||||
exit;
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main provisioning
|
|
||||||
echo Setting up Habitica...
|
|
||||||
echo cd /vagrant >> /home/vagrant/.bashrc
|
|
||||||
# Needed for running e2e tests
|
|
||||||
echo export DISPLAY=:99 >> /home/vagrant/.bashrc
|
|
||||||
|
|
||||||
# Prevent warnings: "dpkg-preconfigure: unable to re-open stdin ..."
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
echo Updating repositories...
|
|
||||||
apt-get update -qq
|
|
||||||
|
|
||||||
echo Installing Unix build tools - needed for node-gyp to use make...
|
|
||||||
apt-get install -qq build-essential
|
|
||||||
|
|
||||||
echo Installing GraphicsMagick - provides gm and convert...
|
|
||||||
apt-get install -qq graphicsmagick
|
|
||||||
|
|
||||||
echo Installing phantomjs and dependency...
|
|
||||||
apt-get install -qq libicu48
|
|
||||||
|
|
||||||
echo Installing requirements for grunt-spritesmith...
|
|
||||||
apt-get install -qq pkg-config libcairo2-dev libjpeg-dev
|
|
||||||
|
|
||||||
# Import MongoDB public GPG key
|
|
||||||
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
|
||||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
|
||||||
|
|
||||||
# Create a list file for MongoDB
|
|
||||||
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
|
||||||
|
|
||||||
echo Installing Mongodb...
|
|
||||||
apt-get update
|
|
||||||
apt-get install mongodb-10gen
|
|
||||||
apt-get install -y mongodb-org=2.6.4 mongodb-org-server=2.6.4 mongodb-org-shell=2.6.4 mongodb-org-mongos=2.6.4 mongodb-org-tools=2.6.4
|
|
||||||
|
|
||||||
echo Installing Git...
|
|
||||||
apt-get install -qq git
|
|
||||||
|
|
||||||
echo Installing npm...
|
|
||||||
apt-get install -qq python-software-properties
|
|
||||||
echo Adding repository node.js...
|
|
||||||
apt-add-repository -y ppa:chris-lea/node.js
|
|
||||||
echo Updating repositories...
|
|
||||||
apt-get update -qq
|
|
||||||
echo Installing node.js
|
|
||||||
apt-get install -qq nodejs
|
|
||||||
echo Updating npm...
|
|
||||||
npm install -g npm
|
|
||||||
echo Installing Xvfb...
|
|
||||||
apt-get install -qq xvfb
|
|
||||||
echo Installing Java7...
|
|
||||||
apt-get install -qq openjdk-7-jre
|
|
||||||
echo Downloading Firefox...
|
|
||||||
wget http://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_40.0.3-0ubuntu1_amd64.deb/download -O firefox.deb >/dev/null 2>&1
|
|
||||||
echo Installing Firefox...
|
|
||||||
dpkg -i firefox.deb
|
|
||||||
rm firefox.deb
|
|
||||||
|
|
||||||
cd /vagrant
|
|
||||||
|
|
||||||
echo Installing gulp/bower...
|
|
||||||
npm install -g gulp grunt-cli bower
|
|
||||||
|
|
||||||
echo Installing Habitica
|
|
||||||
npm install --no-bin-links
|
|
||||||
|
|
||||||
echo Installing Bower packages
|
|
||||||
sudo -H -u vagrant bower --config.interactive=false install -f
|
|
||||||
|
|
||||||
## # echo Seeding Mongodb...
|
|
||||||
## node ./src/seed.js
|
|
||||||
## no longer required - see comments in src/seed.js
|
|
||||||
|
|
||||||
# Uncomment both lines to autostart the habitica server when provisioning
|
|
||||||
# echo Starting Habitica server...
|
|
||||||
# autostart_habitrpg
|
|
||||||
|
|
||||||
13
vagrant_scripts/install_gcc.sh
Executable file
13
vagrant_scripts/install_gcc.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
echo Adding PPA repository for gcc...
|
||||||
|
add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||||
|
apt-get update -qq
|
||||||
|
|
||||||
|
echo Installing gcc 4.8...
|
||||||
|
apt-get install -qq gcc-4.8 g++-4.8
|
||||||
|
|
||||||
|
update-alternatives --remove-all gcc
|
||||||
|
update-alternatives --remove-all g++
|
||||||
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
|
||||||
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
|
||||||
|
update-alternatives --config gcc
|
||||||
|
update-alternatives --config g++
|
||||||
11
vagrant_scripts/install_mongo.sh
Executable file
11
vagrant_scripts/install_mongo.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
# Import MongoDB public GPG key
|
||||||
|
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
||||||
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
||||||
|
|
||||||
|
# Create a list file for MongoDB
|
||||||
|
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get install mongodb-10gen
|
||||||
|
apt-get install -y mongodb-org=2.6.4 mongodb-org-server=2.6.4 mongodb-org-shell=2.6.4 mongodb-org-mongos=2.6.4 mongodb-org-tools=2.6.4
|
||||||
|
|
||||||
22
vagrant_scripts/install_node.sh
Executable file
22
vagrant_scripts/install_node.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo Installing nvm...
|
||||||
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | NVM_DIR="/home/vagrant/.nvm" PROFILE="/home/vagrant/.profile" bash
|
||||||
|
echo "source /home/vagrant/.nvm/nvm.sh" >> /home/vagrant/.profile
|
||||||
|
echo "nvm install" >> /home/vagrant/.profile
|
||||||
|
|
||||||
|
chown -R vagrant:vagrant /home/vagrant/.nvm
|
||||||
|
|
||||||
|
source /home/vagrant/.profile
|
||||||
|
|
||||||
|
echo Setting up node...
|
||||||
|
cd /vagrant
|
||||||
|
nvm install
|
||||||
|
nvm use
|
||||||
|
nvm alias default current
|
||||||
|
|
||||||
|
echo Update npm...
|
||||||
|
npm install -g npm@3
|
||||||
|
|
||||||
|
echo Installing global modules...
|
||||||
|
npm install -g gulp bower grunt-cli mocha
|
||||||
8
vagrant_scripts/install_sprite_dependencies.sh
Executable file
8
vagrant_scripts/install_sprite_dependencies.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
echo Installing GraphicsMagick - provides gm and convert...
|
||||||
|
apt-get install -qq graphicsmagick
|
||||||
|
|
||||||
|
echo Installing phantomjs and dependency...
|
||||||
|
apt-get install -qq libicu48
|
||||||
|
|
||||||
|
echo Installing requirements for grunt-spritesmith...
|
||||||
|
apt-get install -qq pkg-config libcairo2-dev libjpeg-dev
|
||||||
9
vagrant_scripts/install_test_dependencies.sh
Executable file
9
vagrant_scripts/install_test_dependencies.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
echo Installing Xvfb...
|
||||||
|
apt-get install -qq xvfb
|
||||||
|
echo Installing Java7...
|
||||||
|
apt-get install -qq openjdk-7-jre
|
||||||
|
echo Downloading Firefox...
|
||||||
|
wget http://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_40.0.3-0ubuntu1_amd64.deb/download -O firefox.deb >/dev/null 2>&1
|
||||||
|
echo Installing Firefox...
|
||||||
|
dpkg -i firefox.deb
|
||||||
|
rm firefox.deb
|
||||||
73
vagrant_scripts/vagrant.sh
Normal file
73
vagrant_scripts/vagrant.sh
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Habitica provisioning script
|
||||||
|
|
||||||
|
# function for autostart
|
||||||
|
function autostart_habitrpg {
|
||||||
|
update_config=$'Please update config.json with your values\nfor ADMIN_EMAIL, SMTP_USER, SMTP_PASS and SMTP_SERVICE,\nthen run "vagrant reload --provision"'
|
||||||
|
|
||||||
|
# check if config.json exists, then check if the defaults are still in place
|
||||||
|
if [ -e config.json ];
|
||||||
|
then
|
||||||
|
if grep -Fq 'ADMIN_EMAIL": "you@yours.com' config.json;
|
||||||
|
then
|
||||||
|
echo "$update_config";
|
||||||
|
exit;
|
||||||
|
else
|
||||||
|
npm start
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cp config.json.example config.json;
|
||||||
|
echo "$update_config";
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main provisioning
|
||||||
|
echo Setting up Habitica...
|
||||||
|
echo cd /vagrant >> /home/vagrant/.bashrc
|
||||||
|
# Needed for running e2e tests
|
||||||
|
echo export DISPLAY=:99 >> /home/vagrant/.bashrc
|
||||||
|
|
||||||
|
# Prevent warnings: "dpkg-preconfigure: unable to re-open stdin ..."
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
echo Updating repositories...
|
||||||
|
apt-get update -qq
|
||||||
|
|
||||||
|
echo Installing Unix build tools - needed for node-gyp to use make...
|
||||||
|
apt-get install -qq build-essential
|
||||||
|
|
||||||
|
echo Installing python sofrware properties...
|
||||||
|
apt-get install -qq python-software-properties
|
||||||
|
|
||||||
|
echo Installing sprite dependencies...
|
||||||
|
/vagrant/vagrant_scripts/install_sprite_dependencies.sh
|
||||||
|
|
||||||
|
echo Installing Mongodb...
|
||||||
|
/vagrant/vagrant_scripts/install_mongo.sh
|
||||||
|
|
||||||
|
echo Installing gcc...
|
||||||
|
/vagrant/vagrant_scripts/install_gcc.sh
|
||||||
|
|
||||||
|
echo Installing Git...
|
||||||
|
apt-get install -qq git
|
||||||
|
|
||||||
|
echo Installing curl...
|
||||||
|
apt-get install -qq curl
|
||||||
|
|
||||||
|
echo Installing test dependencies...
|
||||||
|
/vagrant/vagrant_scripts/install_gcc.sh
|
||||||
|
|
||||||
|
echo Installing ntp...
|
||||||
|
apt-get install -qq ntp
|
||||||
|
|
||||||
|
echo Installing nvm, node and global node modules...
|
||||||
|
/vagrant/vagrant_scripts/install_node.sh
|
||||||
|
|
||||||
|
echo All done! run npm install to install the required node modules and then npm start to start the server
|
||||||
|
|
||||||
|
# Uncomment both lines to autostart the habitica server when provisioning
|
||||||
|
# echo Starting Habitica server...
|
||||||
|
# autostart_habitrpg
|
||||||
|
|
||||||
@@ -11,11 +11,22 @@ future re: pets and whatnot, this is just temporary.
|
|||||||
|
|
||||||
// see http://stackoverflow.com/questions/24166568/set-bootstrap-modal-body-height-by-percentage
|
// see http://stackoverflow.com/questions/24166568/set-bootstrap-modal-body-height-by-percentage
|
||||||
.profile-modal
|
.profile-modal
|
||||||
.modal-dialog,.modal-content
|
.modal-dialog
|
||||||
height: 96%
|
height: 100%
|
||||||
|
width: auto
|
||||||
|
max-width: 920px
|
||||||
|
margin: 0 auto
|
||||||
|
padding: 10px
|
||||||
|
@media screen and (min-width:768px)
|
||||||
|
padding: 30px 10px
|
||||||
|
.modal-content
|
||||||
|
height: 100%
|
||||||
.modal-body
|
.modal-body
|
||||||
max-height: calc(100% - 150px) //100% = dialog height, 150px = header + footer
|
max-height: calc(100% - 137px) // 100% = dialog height, 137px = header (70px) + footer (67px)
|
||||||
overflow-y: scroll
|
overflow-y: scroll
|
||||||
|
.modal-footer
|
||||||
|
margin: 0
|
||||||
|
padding: 16px 20px
|
||||||
|
|
||||||
.herobox
|
.herobox
|
||||||
// Base styles
|
// Base styles
|
||||||
|
|||||||
@@ -198,10 +198,9 @@ a.label
|
|||||||
.markdown-preview markdown code
|
.markdown-preview markdown code
|
||||||
white-space inherit
|
white-space inherit
|
||||||
|
|
||||||
// By default everything should render as pixelart, except images from img tags (which tend to be things like gravatars,
|
// By default everything should render as pixelart
|
||||||
// screenshots and so on)
|
|
||||||
*
|
*
|
||||||
image-rendering: pixelated
|
image-rendering: pixelated
|
||||||
|
|
||||||
.img-rendering-auto, .emoji
|
.img-rendering-auto, .img-rendering-auto *, .emoji
|
||||||
image-rendering: auto
|
image-rendering: auto
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ html(ng-app='habitrpg', ng-controller='RootCtrl')
|
|||||||
h4= env.t('joinOthers', {userCount:'900,000'})
|
h4= env.t('joinOthers', {userCount:'900,000'})
|
||||||
small
|
small
|
||||||
button#play-btn.btn.btn-primary.btn-lg.gamifybutton(ng-click='playButtonClick()')= env.t('free')
|
button#play-btn.btn.btn-primary.btn-lg.gamifybutton(ng-click='playButtonClick()')= env.t('free')
|
||||||
.presslogos.text-center
|
.presslogos.text-center.img-rendering-auto
|
||||||
= env.t('featuredIn')
|
= env.t('featuredIn')
|
||||||
br
|
br
|
||||||
img(src='https://d2afqr2xdmyzvu.cloudfront.net/front/images/presslogos/lifehacker.png')
|
img(src='https://d2afqr2xdmyzvu.cloudfront.net/front/images/presslogos/lifehacker.png')
|
||||||
|
|||||||
Reference in New Issue
Block a user