mirror of
https://github.com/open-webui/desktop
synced 2025-06-26 18:15:59 +00:00
refac
This commit is contained in:
parent
1a9c2ac192
commit
347ff2aa18
@ -197,6 +197,8 @@ if (!gotTheLock) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
const onReady = async () => {
|
||||
console.log(process.resourcesPath);
|
||||
console.log(app.getName());
|
||||
@ -405,14 +407,15 @@ if (!gotTheLock) {
|
||||
notification.show();
|
||||
});
|
||||
|
||||
app.on('before-quit', () => {
|
||||
app.on('before-quit', async () => {
|
||||
app.isQuiting = true; // Ensure quit flag is set
|
||||
stopAllServers();
|
||||
await stopAllServers();
|
||||
});
|
||||
|
||||
// Quit when all windows are closed, except on macOS
|
||||
app.on('window-all-closed', () => {
|
||||
app.on('window-all-closed', async () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
await stopAllServers()
|
||||
app.isQuitting = true;
|
||||
app.quit();
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
<div class="w-full h-full absolute top-0 left-0 backdrop-blur-sm bg-black/50"></div>
|
||||
|
||||
<div class=" absolute w-full top-0 left-0 right-0 z-10">
|
||||
<div class="h-10 drag-region"></div>
|
||||
<div class="h-6 drag-region"></div>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 w-full flex justify-center relative">
|
||||
|
||||
@ -423,7 +423,7 @@ export async function startServer(installationPath?: string, port?: number): Pro
|
||||
const childProcess = spawn(startCommand, {
|
||||
shell: true,
|
||||
detached: false,
|
||||
stdio: ['ignore', 'pipe'], // Let us capture logs via stdout/stderr
|
||||
stdio: ['ignore', 'pipe', 'pipe'], // Let us capture logs via stdout/stderr
|
||||
windowsHide: true
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user