支持配置后台页面入口
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user