refactor: Update Navbar to remove chat link and simplify navigation
- Remove the chat link from the Navbar, filtering out the '/chat' route from the navigation items. - Simplify the rendering of navigation items by displaying only the item names without additional chat-related elements, enhancing clarity and user experience.
This commit is contained in:
parent
2d5c395d6c
commit
9b280be1a1
1 changed files with 2 additions and 10 deletions
|
|
@ -249,20 +249,12 @@ const handleLogout = async () => {
|
||||||
<LanguageSwitcher />
|
<LanguageSwitcher />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<router-link v-for="item in navigation" :key="item.name" :to="item.href"
|
<router-link v-for="item in navigation.filter(nav => nav.href !== '/chat')" :key="item.name" :to="item.href"
|
||||||
class="flex items-center gap-2 px-3 py-2 text-base font-medium text-muted-foreground hover:text-foreground transition-colors relative"
|
class="flex items-center gap-2 px-3 py-2 text-base font-medium text-muted-foreground hover:text-foreground transition-colors relative"
|
||||||
:class="{
|
:class="{
|
||||||
'text-foreground': $route.path === item.href
|
'text-foreground': $route.path === item.href
|
||||||
}" @click="isOpen = false">
|
}" @click="isOpen = false">
|
||||||
<!-- Chat icon with notification badge -->
|
<span>{{ item.name }}</span>
|
||||||
<div v-if="item.href === '/chat'" class="relative">
|
|
||||||
<MessageSquare class="h-4 w-4" />
|
|
||||||
<Badge v-if="totalUnreadMessages > 0"
|
|
||||||
class="absolute -top-2 -right-2 h-3.5 w-4 text-xs bg-red-500 text-white border-0 p-0 flex items-center justify-center">
|
|
||||||
{{ totalUnreadMessages > 99 ? '99+' : totalUnreadMessages }}
|
|
||||||
</Badge>
|
|
||||||
</div>
|
|
||||||
{{ item.name }}
|
|
||||||
<!-- Market preloading indicator -->
|
<!-- Market preloading indicator -->
|
||||||
<div v-if="item.href === '/market' && marketPreloader.isPreloading"
|
<div v-if="item.href === '/market' && marketPreloader.isPreloading"
|
||||||
class="w-2 h-2 bg-blue-500 rounded-full animate-pulse"></div>
|
class="w-2 h-2 bg-blue-500 rounded-full animate-pulse"></div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue