mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
fix: view more button in notification center should navigate to notification page
This commit is contained in:
+15
-4
@@ -287,9 +287,17 @@ export const useUiStore = defineStore('Ui', () => {
|
|||||||
const name = String(routeName);
|
const name = String(routeName);
|
||||||
removeNotify(name);
|
removeNotify(name);
|
||||||
if (name === 'notification') {
|
if (name === 'notification') {
|
||||||
const notificationsSettingsStore = useNotificationsSettingsStore();
|
const notificationsSettingsStore =
|
||||||
if (notificationsSettingsStore.notificationLayout === 'notification-center') {
|
useNotificationsSettingsStore();
|
||||||
router.replace({ name: 'feed' });
|
if (
|
||||||
|
notificationsSettingsStore.notificationLayout ===
|
||||||
|
'notification-center'
|
||||||
|
) {
|
||||||
|
if (router.currentRoute.value.query?.fromCenter) {
|
||||||
|
router.replace({ name: 'notification' });
|
||||||
|
} else {
|
||||||
|
router.replace({ name: 'feed' });
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
notificationStore.clearUnseenNotifications();
|
notificationStore.clearUnseenNotifications();
|
||||||
@@ -322,7 +330,10 @@ export const useUiStore = defineStore('Ui', () => {
|
|||||||
function updateTrayIconNotify(force = false) {
|
function updateTrayIconNotify(force = false) {
|
||||||
const notificationsSettingsStore = useNotificationsSettingsStore();
|
const notificationsSettingsStore = useNotificationsSettingsStore();
|
||||||
let newState;
|
let newState;
|
||||||
if (notificationsSettingsStore.notificationLayout === 'notification-center') {
|
if (
|
||||||
|
notificationsSettingsStore.notificationLayout ===
|
||||||
|
'notification-center'
|
||||||
|
) {
|
||||||
newState =
|
newState =
|
||||||
appearanceSettings.notificationIconDot &&
|
appearanceSettings.notificationIconDot &&
|
||||||
(notificationStore.hasUnseenNotifications ||
|
(notificationStore.hasUnseenNotifications ||
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
function navigateToTable() {
|
function navigateToTable() {
|
||||||
isNotificationCenterOpen.value = false;
|
isNotificationCenterOpen.value = false;
|
||||||
router.push({ name: 'notification' });
|
router.push({ name: 'notification', query: { fromCenter: '1' } });
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSendInviteResponseDialog(invite) {
|
function showSendInviteResponseDialog(invite) {
|
||||||
|
|||||||
@@ -150,7 +150,8 @@ describe('NotificationCenterSheet.vue', () => {
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
expect(mocks.router.push).toHaveBeenCalledWith({
|
expect(mocks.router.push).toHaveBeenCalledWith({
|
||||||
name: 'notification'
|
name: 'notification',
|
||||||
|
query: { fromCenter: '1' }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user