Skip to content
Snippets Groups Projects
Commit 389db9dd authored by Trirst's avatar Trirst
Browse files

Add log out button

parent c23af6c7
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,8 @@
</div>
</div>
<div v-else class="text-lg ml-1 mb-1">
Welcome, {{ stateUser.username }}
<span>Welcome, {{ stateUser.username }}</span>
<button @click="logOut" class="ml-2 font-bold">Log out</button>
</div>
</div>
</template>
......@@ -101,6 +102,14 @@ export default {
(error) => console.error("Something went terribly wrong... ", error);
}
},
logOut() {
this.saveStateUser({
id: null,
privileged: null,
username: null,
secret: null,
});
},
...mapActions(["saveStateUser"]),
},
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment