fix(components): add logout link to navbar
This commit is contained in:
parent
e9df5cbe1a
commit
d224f43448
@ -16,6 +16,7 @@
|
||||
messages: "/messages",
|
||||
profile: `/user/${data?.value?.user?._id || 0}`,
|
||||
admin: "/admin",
|
||||
logout: "/logout",
|
||||
};
|
||||
let cur = ref<string>(
|
||||
Object.keys(itemMap).find((a) => itemMap[a] === useRoute().path) ||
|
||||
@ -62,6 +63,7 @@
|
||||
<a-menu-item key="admin" v-if="data?.user?.profile.isAdmin || false">
|
||||
Admin
|
||||
</a-menu-item>
|
||||
<a-menu-item key="logout" v-if="!!data?.user"> Logout </a-menu-item>
|
||||
</a-menu>
|
||||
<div class="acbut" v-if="!data">
|
||||
<a-button size="large" @click="() => navigateTo('/login')">
|
||||
|
Loading…
Reference in New Issue
Block a user