aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-24 11:31:07 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-24 11:31:07 +1000
commite279e6c983158ae8b7c03b548163bd2ffa1e3710 (patch)
tree7144a07617ee08f07caa965eeaa7d80fb7527386 /src/App.vue
parent47ffa89c850a833d6fc8ed2bcca2fd7c58d044aa (diff)
Skip tutorial if page recently visitedskip-tut-for-repeat-visit
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue
index a59d4ee..960459c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -108,8 +108,8 @@ export default defineComponent({
helpOpen: false,
searchOpen: false,
settingsOpen: false,
- tutorialOpen: true,
- welcomeOpen: true,
+ tutorialOpen: localStorage.getItem('visited') == null,
+ welcomeOpen: localStorage.getItem('visited') == null,
disabledActions: new Set(),
tutTriggerAction: null as Action | null,
tutTriggerFlag: false,
@@ -686,11 +686,15 @@ export default defineComponent({
},
},
created(){
+ // Event listeners
window.addEventListener('resize', this.onResize);
window.addEventListener('keyup', this.onKeyUp);
+ // Layout initialisation
tryLayout(this.activeRoot, this.tileAreaPos, this.tileAreaDims, this.lytOpts,
{allowCollapse: true, layoutMap: this.layoutMap});
this.initTreeFromServer();
+ // Remember if page recently visited
+ localStorage.setItem('visited', 'yes');
},
unmounted(){
window.removeEventListener('resize', this.onResize);