mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-10-29 04:04:47 +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) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
h4 Misc
|
||||
button.btn(ng-hide='user.preferences.hideHeader', ng-click='set("preferences.hideHeader",true)') Hide Header
|
||||
button.btn(ng-show='user.preferences.hideHeader', ng-click='set("preferences.hideHeader",false)') Show Header
|
||||
button.btn(ng-click='showTour()') Show Tour
|
||||
button.btn(ng-click='showBailey()') Show Bailey
|
||||
|
||||
div(ng-show='user.auth.local')
|
||||
hr
|
||||
h4 Change Password
|
||||
|
||||
Reference in New Issue
Block a user