mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19:42 +02:00
fix(notifications): zh-CN for the display-time settings, and review leftovers (#564)
- zh-CN entries for the two new rows (label and description). - The toast test header still described the dropped drawer logging, and the noise test typed three members nothing uses any more. - clickNotification's closing brace had been re-indented by accident. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -595,6 +595,11 @@
|
|||||||
'Audio Alerts': '声音提醒',
|
'Audio Alerts': '声音提醒',
|
||||||
'Push Notifications': '推送通知',
|
'Push Notifications': '推送通知',
|
||||||
'Notification Levels': '通知级别',
|
'Notification Levels': '通知级别',
|
||||||
|
'Toast display time': '弹出提示显示时长',
|
||||||
|
'How long the corner pop-ups stay on screen.': '角落弹出提示在屏幕上停留的时长。',
|
||||||
|
'Browser notification display time': '浏览器通知显示时长',
|
||||||
|
'How long a desktop notification stays up before Codeman closes it. Your OS may close it sooner.':
|
||||||
|
'桌面通知在 Codeman 关闭它之前保持显示的时长。系统可能会更早关闭它。',
|
||||||
Critical: '严重',
|
Critical: '严重',
|
||||||
'Per-Event Settings': '按事件设置',
|
'Per-Event Settings': '按事件设置',
|
||||||
'Permission prompts': '权限提示',
|
'Permission prompts': '权限提示',
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ class NotificationManager {
|
|||||||
notif.read = true;
|
notif.read = true;
|
||||||
this.unreadCount = Math.max(0, this.unreadCount - 1);
|
this.unreadCount = Math.max(0, this.unreadCount - 1);
|
||||||
this.updateBadge();
|
this.updateBadge();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switch to session if available
|
// Switch to session if available
|
||||||
if (notif.sessionId && this.app.sessions.has(notif.sessionId)) {
|
if (notif.sessionId && this.app.sessions.has(notif.sessionId)) {
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ type Manager = {
|
|||||||
normalizePreferences: (preferences: Record<string, unknown>) => NotificationPreferences;
|
normalizePreferences: (preferences: Record<string, unknown>) => NotificationPreferences;
|
||||||
notify: (notification: Record<string, unknown>) => void;
|
notify: (notification: Record<string, unknown>) => void;
|
||||||
getToastDurationMs: () => number;
|
getToastDurationMs: () => number;
|
||||||
unreadCount: number;
|
|
||||||
markAllRead: () => void;
|
|
||||||
clearAll: () => void;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const openWindows: JSDOM[] = [];
|
const openWindows: JSDOM[] = [];
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @fileoverview showToast() display time and drawer logging: a toast with no explicit
|
* @fileoverview showToast() display time: a toast with no explicit `duration` uses the
|
||||||
* `duration` uses the notification preference, an explicit `duration` (0 = sticky) still wins,
|
* notification preference, and an explicit `duration` (0 = sticky) still wins.
|
||||||
* and every toast is recorded in the notification drawer.
|
|
||||||
*/
|
*/
|
||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
import { resolve } from 'node:path';
|
import { resolve } from 'node:path';
|
||||||
|
|||||||
Reference in New Issue
Block a user