confirm "trigger new day"

This commit is contained in:
Tyler Renelle
2013-11-08 09:18:03 -08:00
parent 4e668a7de4
commit 4b35551afc

View File

@@ -45,6 +45,7 @@ habitrpg.controller("FooterCtrl", ['$scope', '$rootScope', 'User', '$http', 'Not
* Debug functions. Note that the server route for gems is only available if process.env.DEBUG=true
*/
$scope.addMissedDay = function(){
if (!confirm("Are you sure you want to reset the day?")) return;
var dayBefore = moment(User.user.lastCron).subtract('days', 1).toDate();
User.set('lastCron', dayBefore);
Notification.text('-1 day, remember to refresh');