feat: 隐藏窗口自带应用菜单栏,清理相关死代码

This commit is contained in:
2026-08-17 16:36:05 +08:00
parent e83134a9fb
commit 5bd85769db
3 changed files with 3 additions and 83 deletions
+1 -9
View File
@@ -15,15 +15,7 @@ const api = {
showInFolder: (filePath: string): Promise<boolean> =>
ipcRenderer.invoke('file:show-in-folder', filePath),
setClipboard: (text: string): Promise<boolean> =>
ipcRenderer.invoke('clipboard:write', text),
/** 订阅顶部菜单命令,返回取消订阅函数 */
onMenuCommand: (callback: (cmd: string) => void): (() => void) => {
const listener = (_e: unknown, cmd: string): void => callback(cmd)
ipcRenderer.on('menu:command', listener)
return () => {
ipcRenderer.removeListener('menu:command', listener)
}
}
ipcRenderer.invoke('clipboard:write', text)
}
export type DiffLensApi = typeof api