This commit is contained in:
Emile Nijssen 2021-05-23 12:02:56 +02:00
parent 18b6ce7c78
commit 9d355f67d8
12 changed files with 60 additions and 37 deletions

View file

@ -15,7 +15,8 @@
<div id="app" class="container mx-auto">
<div v-if="authenticated === true">
<h1 class="text-4xl font-medium mt-10 mb-2">WireGuard</h1>
<h2 class="text-sm text-gray-400 mb-10"><span class="cursor-pointer hover:underline" @click="logout">
<h2 class="text-sm text-gray-400 mb-10"><span v-if="requiresPassword" class="cursor-pointer hover:underline"
@click="logout">
Logout
<svg class="h-3 inline" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke="currentColor">

View file

@ -11,6 +11,7 @@ new Vue({
authenticated: null,
authenticating: false,
password: null,
requiresPassword: null,
clients: null,
clientDelete: null,
@ -55,6 +56,7 @@ new Vue({
.then(async () => {
const session = await this.api.getSession();
this.authenticated = session.authenticated;
this.requiresPassword = session.requiresPassword;
return this.refresh();
})
.catch(err => {