Add Portuguese documentation link and logout button

This commit is contained in:
Gabriel Pastori
2023-11-14 20:37:29 -03:00
parent adebbe11c3
commit 5d61c6ff84
5 changed files with 129 additions and 1 deletions

View File

@@ -34,6 +34,14 @@
<v-btn size="small" text @click="showAbout"> Sobre esse Manager </v-btn>
<v-spacer></v-spacer>
<v-btn
v-if="!!AppStore.connection.host"
icon
@click="logout"
:disabled="loading"
>
<v-icon>mdi-logout</v-icon>
</v-btn>
<v-btn
v-if="AppStore.validConnection"
text
@@ -131,6 +139,13 @@ export default {
isHttps: !window.location.protocol === "https:",
}),
methods: {
logout() {
this.AppStore.logout();
this.connection = {
host: "",
globalApiKey: "",
};
},
showAbout() {
this.$refs.about.open();
},

View File

@@ -74,6 +74,17 @@ export const useAppStore = defineStore('app', {
throw e.response?.data?.response?.message || e.response || e
}
},
async logout() {
this.connection = {
valid: false,
host: null,
globalApiKey: null,
}
this.instancesList = []
this.instancesKeys = {}
this.connectionsList = []
window.localStorage.clear();
},
async reconnect() {
try {