Avoid Traefik Pilot iframe code in Traefik webui regarding notifications
This commit is contained in:
parent
cd1f03d4f4
commit
b980c87eff
8 changed files with 143 additions and 198 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue