add +2 Missed Days to debug menu in footer, adjust addMissedDay function and all calls to it

This commit is contained in:
Alice Harris
2015-03-07 18:39:43 +10:00
parent cdc8ff6000
commit 044930b7d3
4 changed files with 8 additions and 6 deletions

View File

@@ -7240,6 +7240,7 @@ process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}

View File

@@ -71,11 +71,11 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl) {
'stats.hp': 1
});
}
$scope.addMissedDay = function(){
if (!confirm("Are you sure you want to reset the day?")) return;
var dayBefore = moment(User.user.lastCron).subtract(1, 'days').toDate();
$scope.addMissedDay = function(numberOfDays){
if (!confirm("Are you sure you want to reset the day by " + numberOfDays + " day(s)?")) return;
var dayBefore = moment(User.user.lastCron).subtract(numberOfDays, 'days').toDate();
User.set({'lastCron': dayBefore});
Notification.text('-1 day, remember to refresh');
Notification.text('-' + numberOfDays + ' day(s), remember to refresh');
}
$scope.addTenGems = function(){
$http.post(ApiUrl.get() + '/api/v2/user/addTenGems').success(function(){

View File

@@ -77,7 +77,8 @@ footer.footer(ng-controller='FooterCtrl')
h4 Debug
.btn-group-vertical
a.btn.btn-default(ng-click='setHealthLow()') Health = 1
a.btn.btn-default(ng-click='addMissedDay()') +1 Missed Day
a.btn.btn-default(ng-click='addMissedDay(1)') +1 Missed Day
a.btn.btn-default(ng-click='addMissedDay(2)') +2 Missed Days
a.btn.btn-default(ng-click='addTenGems()') +10 Gems
a.btn.btn-default(ng-click='addGold()') +GP
a.btn.btn-default(ng-click='addLevelsAndGold()') +Exp +GP +MP

View File

@@ -46,7 +46,7 @@ script(type='text/ng-template', id='modals/restore.html')
label.control-label=env.t('fix21Streaks')
//- This is causing too many problems for users
h3=env.t('other')
a.btn.btn-sm.btn-warning(ng-controller='FooterCtrl', ng-click='addMissedDay()')=env.t('triggerDay')
a.btn.btn-sm.btn-warning(ng-controller='FooterCtrl', ng-click='addMissedDay(1)')=env.t('triggerDay')
.modal-footer
button.btn.btn-default(ng-click='$close()')=env.t('discardChanges')
button.btn.btn-primary(ng-click='restore(); $close();')=env.t('saveAndClose')