add popup welcome on first visit
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user