1
0
Fork 0

Add ability to dismiss pilot notification

This commit is contained in:
Matthieu Hostache 2020-08-24 17:38:24 +02:00 committed by GitHub
parent b67a7215f6
commit 54b94f29e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 8 deletions

View file

@ -3,11 +3,17 @@ export default {
getters: {
isOpen (state) {
return state.isOpen
},
notificationIsHidden (state) {
return state.notificationIsHidden
}
},
mutations: {
toggle (state, isOpen) {
state.isOpen = isOpen || !state.isOpen
},
toggleNotifVisibility (state, isHidden) {
state.notificationIsHidden = isHidden || !state.isHidden
}
},
actions: {
@ -19,9 +25,13 @@ export default {
},
close ({ commit }) {
commit('toggle', false)
},
hideNotification ({ commit }) {
commit('toggleNotifVisibility', true)
}
},
state: {
isOpen: false
isOpen: false,
notificationIsHidden: false
}
}