fix(site): 修复解忧站点图标

This commit is contained in:
yml
2026-11-17 19:12:27 +08:00
parent e47ff25655
commit e80a461182
8 changed files with 60 additions and 9 deletions
@@ -96,10 +96,13 @@ export function useDesktopNotification(scope: 'user' | 'admin') {
if (shouldNotify(event.conversation_id, currentConversationId)) {
try {
const notificationIcon =
document.querySelector<HTMLLinkElement>("link[rel='icon']")?.href ||
'/apple-touch-icon.png'
const notification = new Notification(title, {
body: body.length > 100 ? body.substring(0, 100) + '...' : body,
icon: '/favicon.ico',
badge: '/favicon.ico',
icon: notificationIcon,
badge: notificationIcon,
tag: `chat-${event.conversation_id}`, // 相同会话的通知会被替换
requireInteraction: false,
silent: false,