Added versions and minor cleanup

This commit is contained in:
Leon Etienne (ubuntu wsl)
2021-01-24 16:44:56 +01:00
parent 1dc32e3483
commit 080ff2ceb1
32 changed files with 127 additions and 39 deletions

View File

@@ -0,0 +1,24 @@
import axios from 'axios';
export const state = () => ({
serverVersion: -1
});
export const mutations = {
update(state, data) {
state.serverVersion = data;
},
};
export const actions = {
update(context) {
axios.post("/api", {
request: "get_server_version"
})
.then(function(response) {
if (response.data.status === "OK") {
context.commit("update", response.data.server_version);
}
});
},
};