mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
add +2 Missed Days to debug menu in footer, adjust addMissedDay function and all calls to it
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user