mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
feat(tour): esc force closes, but puts justin head in toolbar. clicking
justin head brings tour back.
This commit is contained in:
2
common/dist/sprites/habitrpg-shared.css
vendored
2
common/dist/sprites/habitrpg-shared.css
vendored
File diff suppressed because one or more lines are too long
734
common/dist/sprites/spritesmith3.css
vendored
734
common/dist/sprites/spritesmith3.css
vendored
File diff suppressed because it is too large
Load Diff
BIN
common/dist/sprites/spritesmith3.png
vendored
BIN
common/dist/sprites/spritesmith3.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 503 KiB After Width: | Height: | Size: 503 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 794 B |
BIN
common/img/sprites/spritesmith/npcs/npc_justin_head.png
Normal file
BIN
common/img/sprites/spritesmith/npcs/npc_justin_head.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -229,7 +229,7 @@ function($rootScope, User, $timeout, $state) {
|
||||
if (!updateFn) return; // only run after user has been wrapped
|
||||
watcher(); // deregister watcher
|
||||
if (window.env.IS_MOBILE) return; // Don't show tour immediately on mobile devices
|
||||
goto('intro', User.user.flags.tour.intro, true);
|
||||
goto('intro', 0); // kick off first step on first visit
|
||||
|
||||
var alreadyShown = function(before, after) { return !(!before && after === true) };
|
||||
//$rootScope.$watch('user.flags.dropsEnabled', _.flow(alreadyShown, function(already) { //FIXME requires lodash@~3.2.0
|
||||
@@ -256,14 +256,10 @@ function($rootScope, User, $timeout, $state) {
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("keyup.tour-intro", function(e) {
|
||||
if (e.which == 27) {
|
||||
return User.set({'flags.tour.intro':-2});
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
var Guide = {
|
||||
goto: goto
|
||||
};
|
||||
$rootScope.Guide = Guide;
|
||||
return Guide;
|
||||
|
||||
}]);
|
||||
|
||||
@@ -121,7 +121,7 @@ var UserSchema = new Schema({
|
||||
showTour: {type: Boolean, 'default': true},
|
||||
tour: {
|
||||
// -1 indicates "uninitiated", -2 means "complete", any other number is the current tour step (0-index)
|
||||
intro: {type: Number, 'default': 0},
|
||||
intro: {type: Number, 'default': -1},
|
||||
classes: {type: Number, 'default': -1},
|
||||
stats: {type: Number, 'default': -1},
|
||||
tavern: {type: Number, 'default': -1},
|
||||
|
||||
@@ -269,6 +269,11 @@ nav.toolbar(ng-controller='AuthCtrl', ng-class='{active: isToolbarHidden}')
|
||||
li.toolbar-currency.silver(popover=env.t('silver'), popover-placement='bottom',popover-trigger='mouseenter')
|
||||
span.shop_silver
|
||||
span {{Shared.silver(user.stats.gp)}}
|
||||
|
||||
ul.toolbar-bailey(ng-class='{inactive: !_expandedMenu}')
|
||||
li.toolbar-bailey-container(ng-if='user.flags.tour.intro!=-2')
|
||||
.npc_justin_head.npc_bailey_head(popover="Continue Tour", popover-trigger='mouseenter', popover-placement='bottom', ng-click='Guide.goto("intro", user.flags.tour.intro, true)')
|
||||
|
||||
ul.toolbar-bailey(ng-class='{inactive: !_expandedMenu}')
|
||||
li.toolbar-bailey-container(ng-if='user.flags.newStuff')
|
||||
.npc_bailey.npc_bailey_head(popover=env.t('psst'), popover-trigger='mouseenter', popover-placement='right', ng-click='openModal("newStuff",{size:"lg"})')
|
||||
|
||||
Reference in New Issue
Block a user