adb-toolkit/frontend/src/lib/quitgate.ts
jegly cf3fb26bd2 Add system tray, APK Installer, fix package visibility, new themes/fonts; bump to v1.3.0
- System tray (Linux): pure Go D-Bus StatusNotifierItem, no cgo/libappindicator.
  Close now offers Minimize to Tray vs Quit instead of always quitting.
- New APK Installer module: batch-install from a folder or hand-picked files,
  live per-file progress, select all/none.
- Fix Packages/App Inspector silently hiding packages disabled/uninstalled by
  Canta/Shizuku (pm list packages needs -u to see them). Added a state filter
  and per-row Restore/Enable/Disable/Uninstall actions.
- 6 new theme palettes (Nord, Tokyo Night, Solarized Dark/Light, Rosé Pine,
  Everforest - 26 total), custom text colour, 8 bundled display fonts,
  adjustable font size.
- Horizontal sidebar now shrinks label text progressively instead of
  scrolling when the window narrows; fixed a touchpad stuck-scrollbar-drag bug.
- Updated README and fixed stale Go 1.23 -> 1.25 build instructions.
2026-07-09 20:05:26 +10:00

13 lines
435 B
TypeScript

// Trigger for the close-confirmation dialog (QuitGate.tsx). The title bar's
// close button calls requestQuitConfirm() instead of quitting directly, so
// the user picks Minimize-to-tray vs Quit rather than the window just vanishing.
let host: (() => void) | null = null
export function _registerQuitHost(fn: () => void): () => void {
host = fn
return () => { host = null }
}
export function requestQuitConfirm() {
host?.()
}