Dashboard styling; don't allow login if you have no guild perms; allow logging out

This commit is contained in:
Dragory 2019-07-22 00:11:24 +03:00
parent a517ca3906
commit 0f724fc9bd
9 changed files with 132 additions and 35 deletions

View file

@ -35,6 +35,16 @@ export const AuthStore: Module<AuthState, RootState> = {
localStorage.setItem("apiKey", newKey);
commit("setApiKey", newKey);
},
clearApiKey({ commit }) {
localStorage.removeItem("apiKey");
commit("setApiKey", null);
},
async logout({ dispatch }) {
await post("auth/logout");
await dispatch("clearApiKey");
},
},
mutations: {