feat(ui): add custom branding and Chinese localization

This commit is contained in:
codeman-local
2026-07-21 02:49:25 +08:00
parent 6c8d4ca72f
commit 8d9fc4195b
14 changed files with 1191 additions and 11 deletions
+4 -2
View File
@@ -330,8 +330,10 @@ class NotificationManager {
if (now - this.lastBrowserNotifTime < BROWSER_NOTIF_RATE_LIMIT_MS) return;
this.lastBrowserNotifTime = now;
const notif = new Notification(`${this.originalTitle}: ${title}`, {
body,
const localizedTitle = window.codemanT?.(title) || title;
const localizedBody = window.codemanT?.(body) || body;
const notif = new Notification(`${this.originalTitle}: ${localizedTitle}`, {
body: localizedBody,
tag, // Groups same-tag notifications
icon: '/favicon.ico',
silent: true, // We handle audio ourselves