mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
8a4bec65dc
Raise the lock screen to max z-index and hide the context-menu portal while locked. Centralize isAppLockOverlayActive and gate ChatInput slash picker, SFTP shortcuts, theme modal, and shortkey/hotkey recorders so earlier window-capture listeners cannot steal unlock keystrokes.
14 lines
574 B
TypeScript
14 lines
574 B
TypeScript
/** DOM marker for the App Lock overlay root (`data-app-lock-overlay`). */
|
|
export const APP_LOCK_OVERLAY_SELECTOR = "[data-app-lock-overlay]";
|
|
|
|
/**
|
|
* True when the App Lock overlay is currently mounted.
|
|
* Window/document capture key handlers that register before the overlay must
|
|
* consult this so password keystrokes cannot mutate app state behind the lock.
|
|
*/
|
|
export function isAppLockOverlayActive(
|
|
doc: Document | null | undefined = typeof document !== "undefined" ? document : null,
|
|
): boolean {
|
|
return Boolean(doc?.querySelector(APP_LOCK_OVERLAY_SELECTOR));
|
|
}
|