added popup control fix #3
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij
2023-02-19 17:55:11 +01:00
parent c3d74e782d
commit 926947e7c9
6 changed files with 86 additions and 2 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -15,6 +15,6 @@ export default {
videos: 0,
users: 0
}
}
},
popups: []
}