cleanup & resolve comment

- remove username check, move current user indicator into v-if=loggedIn
- use the closeHovers method instead of committing to the store
pull/2821/head
Jonathan Bout 2025-07-10 17:37:27 +02:00
parent 1f5c197607
commit 3be691306d
No known key found for this signature in database
GPG Key ID: 2E62EB7F87971D9B
1 changed files with 5 additions and 5 deletions

View File

@ -1,11 +1,11 @@
<template> <template>
<div v-show="active" @click="closeHovers" class="overlay"></div> <div v-show="active" @click="closeHovers" class="overlay"></div>
<nav :class="{ active }"> <nav :class="{ active }">
<button v-if="user.username" @click="toAccountSettings" class="action">
<i class="material-icons">person</i>
<span>{{ user.username }}</span>
</button>
<template v-if="isLoggedIn"> <template v-if="isLoggedIn">
<button @click="toAccountSettings" class="action">
<i class="material-icons">person</i>
<span>{{ user.username }}</span>
</button>
<button <button
class="action" class="action"
@click="toRoot" @click="toRoot"
@ -195,7 +195,7 @@ export default {
}, },
toAccountSettings() { toAccountSettings() {
this.$router.push({ path: "/settings/profile" }); this.$router.push({ path: "/settings/profile" });
this.$store.commit("closeHovers"); this.closeHovers();
}, },
toSettings() { toSettings() {
this.$router.push({ path: "/settings/global" }); this.$router.push({ path: "/settings/global" });