Feat may set api url (#850)

* add api url settings

* may edit api setting before login
This commit is contained in:
an-lee
2024-07-20 17:18:33 +08:00
committed by GitHub
parent fef5aac7b2
commit 223ae743ed
11 changed files with 242 additions and 58 deletions

View File

@@ -315,11 +315,13 @@ main.init = () => {
});
ipcMain.handle("app-api-url", () => {
return process.env.WEB_API_URL || WEB_API_URL;
const apiUrl = settings.getSync("apiUrl");
return process.env.WEB_API_URL || apiUrl || WEB_API_URL;
});
ipcMain.handle("app-ws-url", () => {
return process.env.WS_URL || WS_URL;
const wsUrl = settings.getSync("wsUrl");
return process.env.WS_URL || wsUrl || WS_URL;
});
ipcMain.handle("app-quit", () => {