mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +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 = {};
|
||||
_.each(chapters, function(v,k){
|
||||
tour[k] = new Tour({
|
||||
name: k,
|
||||
backdrop: true,
|
||||
template: function(i,step){
|
||||
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 {
|
||||
goto: goto
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user