1
0
Fork 0

Avoid Traefik Pilot iframe code in Traefik webui regarding notifications

This commit is contained in:
Matthieu Hostache 2020-09-15 10:26:03 +02:00 committed by GitHub
parent cd1f03d4f4
commit b980c87eff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 143 additions and 198 deletions

View file

@ -1,6 +1,9 @@
export default {
namespaced: true,
getters: {
path (state) {
return state.path
},
isOpen (state) {
return state.isOpen
},
@ -11,6 +14,12 @@ export default {
mutations: {
toggle (state, isOpen) {
state.isOpen = isOpen || !state.isOpen
if (!state.isOpen) {
state.path = '/'
}
},
setPath (state, path = '/') {
state.path = path
},
toggleNotifVisibility (state, isHidden) {
state.notificationIsHidden = isHidden || !state.isHidden
@ -20,10 +29,12 @@ export default {
toggle ({ commit }) {
commit('toggle')
},
open ({ commit }) {
open ({ commit }, path) {
commit('setPath', path)
commit('toggle', true)
},
close ({ commit }) {
commit('setPath', '/')
commit('toggle', false)
},
hideNotification ({ commit }) {
@ -31,6 +42,7 @@ export default {
}
},
state: {
path: '/',
isOpen: false,
notificationIsHidden: false
}