mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1396] add ability to show tour at any time. Also add ability to show
Bailey at any time
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
// Make user and settings available for everyone through root scope.
|
||||
habitrpg.controller('SettingsCtrl',
|
||||
['$scope', 'User', '$rootScope', '$http', 'API_URL',
|
||||
function($scope, User, $rootScope, $http, API_URL) {
|
||||
['$scope', 'User', '$rootScope', '$http', 'API_URL', 'Guide', '$location',
|
||||
function($scope, User, $rootScope, $http, API_URL, Guide, $location) {
|
||||
|
||||
// FIXME we have this re-declared everywhere, figure which is the canonical version and delete the rest
|
||||
// $scope.auth = function (id, token) {
|
||||
@@ -15,6 +15,16 @@ habitrpg.controller('SettingsCtrl',
|
||||
// });
|
||||
// }
|
||||
|
||||
$scope.showTour = function(){
|
||||
User.set('flags.showTour',true);
|
||||
Guide.initTour();
|
||||
$location.path('/tasks');
|
||||
}
|
||||
|
||||
$scope.showBailey = function(){
|
||||
User.set('flags.newStuff',true);
|
||||
}
|
||||
|
||||
$scope.saveDayStart = function(){
|
||||
var dayStart = +User.user.preferences.dayStart;
|
||||
if (dayStart < 0 || dayStart > 24) {
|
||||
|
||||
Reference in New Issue
Block a user