支持配置后台页面入口

This commit is contained in:
yml2213
2026-06-11 08:00:13 +08:00
parent 7130135e23
commit 6d61a336d6
27 changed files with 157 additions and 85 deletions
@@ -1,6 +1,7 @@
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import type { ChatEvent } from './useChatSSE'
import { adminPath } from '@/shared/utils/adminPath'
import { debugError } from '@/shared/utils/debug'
export type NotificationPermission = 'default' | 'granted' | 'denied'
@@ -109,7 +110,7 @@ export function useDesktopNotification(scope: 'user' | 'admin') {
window.focus()
const path =
scope === 'admin'
? `/admin/chats/${event.conversation_id}`
? adminPath(`chats/${event.conversation_id}`)
: `/messages/${event.conversation_id}`
router.push(path)
notification.close()