Make mentions and direct notes accessible via url fragments

This commit is contained in:
Norm 2022-09-03 15:14:42 -04:00
parent f2ebf77ab1
commit f0ba8d1877
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE
2 changed files with 8 additions and 1 deletions

View file

@ -24,7 +24,13 @@ import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata'; import { definePageMetadata } from '@/scripts/page-metadata';
let tab = $ref('all'); const props = withDefaults(defineProps<{
initialTab?: string;
}>(), {
initialTab: 'all',
});
let tab = $ref(props.initialTab);
let includeTypes = $ref<string[] | null>(null); let includeTypes = $ref<string[] | null>(null);
let unreadOnly = $computed(() => tab === 'unread'); let unreadOnly = $computed(() => tab === 'unread');

View file

@ -161,6 +161,7 @@ export const routes = [{
}, { }, {
path: '/my/notifications', path: '/my/notifications',
component: page(() => import('./pages/notifications.vue')), component: page(() => import('./pages/notifications.vue')),
hash: 'initialTab',
loginRequired: true, loginRequired: true,
}, { }, {
path: '/my/favorites', path: '/my/favorites',