修复图片解密 修复密钥获取

This commit is contained in:
xuncha
2026-03-02 16:44:09 +08:00
parent fb8663fb24
commit 3d4a79aac6
8 changed files with 32 additions and 14 deletions

View File

@@ -113,7 +113,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
// 密钥获取
key: {
autoGetDbKey: () => ipcRenderer.invoke('key:autoGetDbKey'),
autoGetImageKey: (manualDir?: string) => ipcRenderer.invoke('key:autoGetImageKey', manualDir),
autoGetImageKey: (manualDir?: string, wxid?: string) => ipcRenderer.invoke('key:autoGetImageKey', manualDir, wxid),
onDbKeyStatus: (callback: (payload: { message: string; level: number }) => void) => {
ipcRenderer.on('key:dbKeyStatus', (_, payload) => callback(payload))
return () => ipcRenderer.removeAllListeners('key:dbKeyStatus')