bug修复调整

This commit is contained in:
zhongluofeng
2026-08-31 18:05:27 +08:00
parent 28e0c4664a
commit 6b9f71da08
35 changed files with 1004 additions and 296 deletions
+14 -2
View File
@@ -16,8 +16,16 @@ export const commands = {
* 调用返回前会触发应用退出。
*/
updateInstall: (downloadedPath: string) => __TAURI_INVOKE<null>("update_install", { downloadedPath }),
/** 更新 ThingHK 内核:下载 thing-hk_{v}.zip → 停止监控内核 → 覆盖内核文件 */
updateThinghk: () => __TAURI_INVOKE<null>("update_thinghk"),
/**
* 应用 ThingHK 内核更新:下载阶段已由下载模块完成,本命令仅做
* need_stop(等待前端停止监控内核并确认)→ 解压 → 替换。
* 进度通过 UPDATE_PROGRESS 事件上报,前端据 need_stop 弹出确认对话框。
*/
updateThinghkApply: (zipPath: string) => __TAURI_INVOKE<null>("update_thinghk_apply", { zipPath }),
/** 前端已停止监控内核,确认继续解压替换(唤醒 need_stop 等待) */
updateThinghkConfirm: () => __TAURI_INVOKE<null>("update_thinghk_confirm"),
/** 取消 ThingHK 内核更新(need_stop 等待阶段有效:唤醒 apply 以「已取消」返回,zip 保留便于重试) */
updateThinghkCancel: () => __TAURI_INVOKE<null>("update_thinghk_cancel"),
proxyActivateProfile: (id: string) => __TAURI_INVOKE<null>("proxy_activate_profile", { id }),
/** 应用内核更新:下载阶段已由下载模块完成,本方法仅做 need_stop → 解压 → 替换。 */
proxyApplyKernelUpdate: (zipPath: string) => __TAURI_INVOKE<KernelInfo>("proxy_apply_kernel_update", { zipPath }),
@@ -110,6 +118,10 @@ export const commands = {
/**
* 运行系统命令(不设置 CREATE_NO_WINDOW,使 cmd/powershell/regedit 等显示自身窗口)
* 适用于内置系统工具:regedit、shutdown、cmd、powershell、taskmgr 等。
* - 控制台类交互程序(cmd/powershell/pwsh)额外设置 CREATE_NEW_CONSOLE
* 否则从 GUI 宿主启动时无可见控制台窗口(表现为"点击没反应")。
* - .msc 控制台文件(如 devmgmt.msc)不可被 CreateProcess 直接执行,
* 改由 mmc 打开(路径解析到 System32,不受当前工作目录影响)。
*/
quickpanelRunSystemCommand: (command: string, args: string[]) => __TAURI_INVOKE<null>("quickpanel_run_system_command", { command, args }),
/** 列出目录下的压缩包文件(供批量解压面板使用)。 */
+4
View File
@@ -61,6 +61,10 @@ export const EVENTS = {
osdContentSize: 'osd-content-size',
osdSystemUiActive: 'osd-system-ui-active',
osdSystemUiInactive: 'osd-system-ui-inactive',
/** 前台出现全屏应用(游戏):OSD 应隐藏以避免游戏掉帧 */
osdGameActive: 'osd-game-active',
/** 全屏应用退出前台:OSD 可恢复显示 */
osdGameInactive: 'osd-game-inactive',
osdStartDrag: 'osd-start-drag',
osdEndDrag: 'osd-end-drag',
monitorReady: 'monitor-ready',