added popup control fix #3
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -87,5 +87,12 @@ export default {
|
||||
},
|
||||
resetRedisCache(context) {
|
||||
axios.post(context.rootGetters.server + "/api/system/reset/redis", {}, context.rootGetters.headers);
|
||||
context.dispatch("addPoUp", { title: "Cache", message: "Cache was reseted", type: "info" })
|
||||
},
|
||||
addPoUp(context, item) {
|
||||
context.commit("addPopUp", item);
|
||||
},
|
||||
removePopUp(context, item) {
|
||||
context.commit("removePopUp", item);
|
||||
}
|
||||
}
|
||||
@@ -25,5 +25,12 @@ export default {
|
||||
},
|
||||
setServerInfo(state, info) {
|
||||
state.serverInfo = info;
|
||||
},
|
||||
addPopUp(state, item) {
|
||||
state.popups.push(item);
|
||||
},
|
||||
removePopUp(state, item) {
|
||||
let index = state.popups.indexOf(item);
|
||||
state.popups.splice(index, 1);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,6 @@ export default {
|
||||
videos: 0,
|
||||
users: 0
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
popups: []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user