mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-31 06:41:03 +00:00
feat: add isMainWindowOpen functionality and enhance game launcher UI
This commit is contained in:
@@ -7,6 +7,7 @@ import "./get-hydra-decky-plugin-info";
|
||||
import "./hydra-api-call";
|
||||
import "./install-common-redist";
|
||||
import "./install-hydra-decky-plugin";
|
||||
import "./is-main-window-open";
|
||||
import "./open-checkout";
|
||||
import "./open-external";
|
||||
import "./open-main-window";
|
||||
|
||||
12
src/main/events/misc/is-main-window-open.ts
Normal file
12
src/main/events/misc/is-main-window-open.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { registerEvent } from "../register-event";
|
||||
import { WindowManager } from "@main/services";
|
||||
|
||||
const isMainWindowOpen = async () => {
|
||||
return (
|
||||
WindowManager.mainWindow !== null &&
|
||||
!WindowManager.mainWindow.isDestroyed() &&
|
||||
WindowManager.mainWindow.isVisible()
|
||||
);
|
||||
};
|
||||
|
||||
registerEvent("isMainWindowOpen", isMainWindowOpen);
|
||||
Reference in New Issue
Block a user