mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1477] port settings modals to jade, implemented restore
This commit is contained in:
@@ -49,5 +49,21 @@ habitrpg.controller('SettingsCtrl',
|
||||
});
|
||||
}
|
||||
|
||||
$scope.restore = function(){
|
||||
var stats = User.user.stats,
|
||||
items = User.user.items;
|
||||
User.setMultiple({
|
||||
"stats.hp": stats.hp,
|
||||
"stats.exp": stats.exp,
|
||||
"stats.gp": stats.gp,
|
||||
"stats.lvl": stats.lvl,
|
||||
"items.weapon": items.weapon,
|
||||
"items.armor": items.armor,
|
||||
"items.head": items.head,
|
||||
"items.shield": items.shield
|
||||
});
|
||||
$rootScope.modals.restore = false;
|
||||
}
|
||||
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user