mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
fix friend log notify
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
<i :class="item.icon"></i>
|
<i :class="item.icon"></i>
|
||||||
<span>{{ t(item.title || '') }}</span>
|
<span>{{ t(item.title || '') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="nav-menu-popover__menu">
|
<div class="nav-menu-popover__menu">
|
||||||
<button
|
<button
|
||||||
v-for="entry in item.entries"
|
v-for="entry in item.entries"
|
||||||
@@ -46,12 +47,21 @@
|
|||||||
type="button"
|
type="button"
|
||||||
class="nav-menu-popover__menu-item"
|
class="nav-menu-popover__menu-item"
|
||||||
@click="handleSubmenuClick(entry.path, item.index)">
|
@click="handleSubmenuClick(entry.path, item.index)">
|
||||||
<span class="nav-menu-popover__menu-label">{{ t(entry.label) }}</span>
|
<span class="nav-menu-popover__menu-label"
|
||||||
|
>{{ t(entry.label) }}<span class="nav-menu-popover__menu-label-dot"></span
|
||||||
|
></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-menu-item :index="item.index" :class="{ notify: notifiedMenus.includes(item.index) }">
|
<el-menu-item
|
||||||
|
:index="item.index"
|
||||||
|
:class="{
|
||||||
|
notify:
|
||||||
|
notifiedMenus.includes(item.index) ||
|
||||||
|
(notifiedMenus.includes('friend-log') && item.index === 'social')
|
||||||
|
}">
|
||||||
<i :class="item.icon"></i>
|
<i :class="item.icon"></i>
|
||||||
<template #title v-if="item.tooltip">
|
<template #title v-if="item.tooltip">
|
||||||
<span>{{ t(item.tooltip) }}</span>
|
<span>{{ t(item.tooltip) }}</span>
|
||||||
@@ -244,9 +254,9 @@
|
|||||||
tooltip: '',
|
tooltip: '',
|
||||||
title: 'nav_tooltip.social',
|
title: 'nav_tooltip.social',
|
||||||
entries: [
|
entries: [
|
||||||
{ label: 'nav_tooltip.friend_log', path: '/friend-log' },
|
{ label: 'nav_tooltip.friend_log', path: '/social/friend-log' },
|
||||||
{ label: 'nav_tooltip.friend_list', path: '/friend-list' },
|
{ label: 'nav_tooltip.friend_list', path: '/social/friend-list' },
|
||||||
{ label: 'nav_tooltip.moderation', path: '/moderation' }
|
{ label: 'nav_tooltip.moderation', path: '/social/moderation' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -508,6 +518,16 @@
|
|||||||
|
|
||||||
.nav-menu-popover__menu-label {
|
.nav-menu-popover__menu-label {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-menu-popover__menu-label-dot {
|
||||||
|
position: absolute;
|
||||||
|
right: -4px;
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
background: #303133;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-6
@@ -25,11 +25,11 @@ const routes = [
|
|||||||
{ path: '/player-list', name: 'player-list', component: PlayerList },
|
{ path: '/player-list', name: 'player-list', component: PlayerList },
|
||||||
{ path: '/search', name: 'search', component: Search },
|
{ path: '/search', name: 'search', component: Search },
|
||||||
{ path: '/favorites', name: 'favorites', component: Favorites },
|
{ path: '/favorites', name: 'favorites', component: Favorites },
|
||||||
{ path: '/friend-log', name: 'friend-log', component: FriendLog },
|
{ path: '/social/friend-log', name: 'friend-log', component: FriendLog },
|
||||||
{ path: '/moderation', name: 'moderation', component: Moderation },
|
{ path: '/social/moderation', name: 'moderation', component: Moderation },
|
||||||
{ path: '/notification', name: 'notification', component: Notification },
|
{ path: '/notification', name: 'notification', component: Notification },
|
||||||
{
|
{
|
||||||
path: '/friend-list',
|
path: '/social/friend-list',
|
||||||
name: 'friend-list',
|
name: 'friend-list',
|
||||||
component: FriendList
|
component: FriendList
|
||||||
},
|
},
|
||||||
@@ -51,9 +51,13 @@ export function initRouter(app) {
|
|||||||
app.use(router);
|
app.use(router);
|
||||||
}
|
}
|
||||||
|
|
||||||
router.beforeEach((to, from) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (to.path === '/social') {
|
if (to.path == '/') {
|
||||||
|
next('/feed');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (to.path === '/social' || to.path === '/social/social') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
next();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user