fix: 修复ws相关逻辑

This commit is contained in:
DLmaster361
2025-09-11 21:57:24 +08:00
parent ed81cc65ce
commit a33e2675dd
10 changed files with 542 additions and 345 deletions

View File

@@ -537,6 +537,10 @@ ipcMain.handle('start-backend', async () => {
return startBackend(appRoot)
})
ipcMain.handle('stop-backend', async () => {
return stopBackend()
})
// Git相关
ipcMain.handle('download-git', async () => {
const appRoot = getAppRoot()

View File

@@ -26,6 +26,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
cloneBackend: (repoUrl?: string) => ipcRenderer.invoke('clone-backend', repoUrl),
updateBackend: (repoUrl?: string) => ipcRenderer.invoke('update-backend', repoUrl),
startBackend: () => ipcRenderer.invoke('start-backend'),
stopBackend: () => ipcRenderer.invoke('stop-backend'),
// 管理员权限相关
checkAdmin: () => ipcRenderer.invoke('check-admin'),