add popup welcome on first visit

This commit is contained in:
axolotle
2021-07-02 19:41:29 +02:00
parent ad8575b7c9
commit fa83b7ca41
7 changed files with 129 additions and 33 deletions
+9 -2
View File
@@ -7,14 +7,20 @@ export default {
welcome: undefined,
intro: undefined,
ids: {
welcome: 1,
welcome: 208,
intro: 207
}
},
visited: localStorage.getItem('visited') === 'true'
},
mutations: {
'SET_PAGE' (state, { slug, page }) {
state[slug] = page
},
'SET_VISITED' (state, visited) {
state.visited = visited
localStorage.setItem('visited', visited)
}
},
@@ -29,5 +35,6 @@ export default {
},
getters: {
visited: state => state.visited
}
}