mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
feat(tour): ESC to perma-close #4886 @lemoness @alys
This commit is contained in:
@@ -135,6 +135,7 @@ function($rootScope, User, $timeout, $state) {
|
|||||||
var tour = {};
|
var tour = {};
|
||||||
_.each(chapters, function(v,k){
|
_.each(chapters, function(v,k){
|
||||||
tour[k] = new Tour({
|
tour[k] = new Tour({
|
||||||
|
name: k,
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
template: function(i,step){
|
template: function(i,step){
|
||||||
return '<div class="popover" role="tooltip"> ' +
|
return '<div class="popover" role="tooltip"> ' +
|
||||||
@@ -204,6 +205,12 @@ function($rootScope, User, $timeout, $state) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("keyup.tour-intro", function(e) {
|
||||||
|
if (e.which == 27) {
|
||||||
|
return User.set({'flags.tour.intro':-1});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
goto: goto
|
goto: goto
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user