一旦フロントエンドまで接続
This commit is contained in:
1 parent
d157dc8b7b
commit
d4a5a1ca6f
3 files changed
+24
-11
No files matched your search
@@ -152,7 +152,18 @@ export const useWindow = () => {
|
||||
const asyncMinimizeApp = async () => {
|
||||
await appWindow.minimize();
|
||||
};
|
||||
|
||||
const asyncCloseApp = async () => {
|
||||
// Send shutdown signal to backend before closing the app
|
||||
// This ensures telemetry app_closed event is sent and flushed
|
||||
// Note: Don't await this call, let it run in background (fire-and-forget)
|
||||
asyncStdoutToPython("/run/shutdown");
|
||||
|
||||
// Give backend time to process shutdown and flush telemetry
|
||||
// Tauri sidecar will be terminated when UI closes, so timing is critical
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
|
||||
// Now close the UI window (this will also terminate the backend sidecar)
|
||||
await appWindow.close();
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user