feat: 添加设置页面 可配置代理开关

This commit is contained in:
alger
2023-12-28 10:45:11 +08:00
parent c7c1143cb4
commit a2c49d354e
12 changed files with 173 additions and 16 deletions
+17 -1
View File
@@ -6,4 +6,20 @@ contextBridge.exposeInMainWorld('electronAPI', {
close: () => ipcRenderer.send('close-window'),
dragStart: (data) => ipcRenderer.send('drag-start', data),
miniTray: () => ipcRenderer.send('mini-tray'),
})
restart: () => ipcRenderer.send('restart'),
})
const electronHandler = {
ipcRenderer: {
setStoreValue: (key, value) => {
ipcRenderer.send("setStore", key, value)
},
getStoreValue(key) {
const resp = ipcRenderer.sendSync("getStore", key)
return resp
},
}
}
contextBridge.exposeInMainWorld('electron', electronHandler)