This commit is contained in:
zhongluofeng committed 2026-10-10 14:29:48 +08:00
1 parent ad987111a3
commit c9e61f38c5
89 files changed
+11775 -3155

No files matched your search

+24 -15
View File
@@ -27,8 +27,13 @@ export const WINDOWS = {
* 时,webview 仍可正常加载与交互,只是拿不到 IPC)。
*/
dshWeb: 'dsh-web',
/** 笔记独立窗口前缀,实际 label = `${notesWindow}-<n>`(可多开) */
notesWindow: 'notes-window',
/** 编辑器独立窗口前缀,实际 label = `${editorWindow}-<n>`(可多开) */
editorWindow: 'editor-window',
/**
* dsh「启动进度」独立窗口(单例)。
* 服务就绪后由主窗口打开真正的 {@link dshWeb} 窗口并关闭它。
*/
dshWindow: 'dsh-window',
} as const
/** Tauri 事件名(前端 emit / listen 与 Rust constants::events 对应) */
@@ -37,8 +42,12 @@ export const EVENTS = {
trayMenuShow: 'tray-menu-show',
trayMenuStateUpdated: 'tray-menu-state-updated',
trayToggleOsd: 'tray:toggle-osd',
trayNewDownload: 'tray:new-download',
trayOpenSettings: 'tray:open-settings',
/** 托盘「终端」:打开新建终端选择窗口 */
trayOpenTerminal: 'tray:open-terminal',
/** 托盘「dsh」:打开 dsh 独立窗口(未启动时先显示启动进度) */
trayOpenDsh: 'tray:open-dsh',
/** 托盘「编辑器」:打开编辑器独立窗口 */
trayOpenEditor: 'tray:open-editor',
// 剪贴板
clipboardChanged: 'clipboard-changed',
clipboardPopupShow: 'clipboard-popup-show',
@@ -150,19 +159,21 @@ export const EVENTS = {
/** 全局快捷键按下:打开 dsh 独立窗口(无负载) */
dshOpenWindow: 'dsh-open-window',
/** 笔记:设置已保存(无负载)。各窗口据此重读设置,实现跨窗口同步 */
notesSettings: 'notes-settings',
editorSettings: 'editor-settings',
/** 笔记:库内容已变更(新建/保存/重命名/删除/切换库根,无负载) */
notesLibraryChanged: 'notes-library-changed',
/** 笔记:库内文件在应用外被改动(负载见 src/types/notes.ts 的 NoteFileEvent) */
notesFileChanged: 'notes-file-changed',
/** 笔记:WebDAV 同步进度(负载见 src/types/notes.ts 的 SyncProgress) */
notesSyncProgress: 'notes-sync-progress',
editorLibraryChanged: 'editor-library-changed',
/** 笔记:库内文件在应用外被改动(负载见 src/types/editor.ts 的 NoteFileEvent) */
editorFileChanged: 'editor-file-changed',
/** 笔记:WebDAV 同步进度(负载见 src/types/editor.ts 的 SyncProgress) */
editorSyncProgress: 'editor-sync-progress',
/** 笔记:全局快捷键「新建笔记」被按下(无负载;主窗口据此打开新建对话框) */
notesNewNote: 'notes-new-note',
editorNewNote: 'editor-new-note',
/** 笔记:全局快捷键「打开编辑器」被按下(无负载) */
notesOpenEditor: 'notes-open-editor',
editorOpenEditor: 'editor-open-editor',
/** 笔记:需要打开一个磁盘文件(负载 `{ path }`;来自文件关联 / 命令行) */
notesOpenFile: 'notes-open-file',
editorOpenFile: 'editor-open-file',
/** 编辑器:需要打开一个文件夹(负载 `{ path }`;来自资源管理器右键) */
editorOpenFolder: 'editor-open-folder',
} as const
/** localStorage 存储键 */
@@ -188,6 +199,4 @@ export const STORAGE_KEYS = {
monitorOverviewCards: 'thing_monitor_overview_cards',
screenshotHistory: 'thing_screenshot_history',
screenshotPinIndex: 'thing_screenshot_pin_index',
/** 笔记模块:最近打开(`{ relPath, name, at }[]`) */
notesRecent: 'thing_notes_recent',
} as const