fix: logout button
This commit is contained in:
1 parent
c22ac6d3e2
commit
5fe7c91bb8
3 files changed
+12
No files matched your search
@@ -16,3 +16,4 @@ commit
|
|||||||
idea.md
|
idea.md
|
||||||
plan.md
|
plan.md
|
||||||
progress.md
|
progress.md
|
||||||
|
.remote
|
||||||
@@ -39,6 +39,7 @@ run_update() {
|
|||||||
cd /var/horde/hub
|
cd /var/horde/hub
|
||||||
git pull
|
git pull
|
||||||
make install
|
make install
|
||||||
|
make web
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,12 @@
|
|||||||
async function generateToken() {
|
async function generateToken() {
|
||||||
token.value = await backend.newToken();
|
token.value = await backend.newToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function logout() {
|
||||||
|
ui.alert('Logging out');
|
||||||
|
localStorage.removeItem('loginToken');
|
||||||
|
setTimeout(() => window.location.reload(), 600);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -27,6 +33,10 @@
|
|||||||
<pre v-if="token != null" @input.stop.prevent="false">{{ token }}</pre>
|
<pre v-if="token != null" @input.stop.prevent="false">{{ token }}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="home-content" style="margin-top: 2em;">
|
||||||
|
<button @click="logout()" class="button">Logout</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--TheWelcome /-->
|
<!--TheWelcome /-->
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in new issue
Block a user