feat(desktop): bundled renderer, modules and instance accounts (#3254)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-07 16:48:07 +02:00
1 parent c748c8af4e
commit 7c5fa2180a
1275 files changed
+215074 -81246

No files matched your search

+6 -12
View File
@@ -31,16 +31,6 @@ class Window {
constructor() {
makeAutoObservable(this, {}, {autoBind: true});
this.initListeners();
}
private initListeners(): void {
window.addEventListener('focus', () => this.setFocused(true));
window.addEventListener('blur', () => this.setFocused(false));
document.addEventListener('visibilitychange', () => {
this.setVisible(!document.hidden);
});
window.addEventListener('resize', () => this.updateWindowSize());
}
setFocused(focused: boolean): void {
@@ -61,8 +51,12 @@ class Window {
}
updateWindowSize(): void {
this.windowSize = getWindowSize();
logger.debug(`Window resized: ${this.windowSize.width}x${this.windowSize.height}`);
const next = getWindowSize();
if (next.width === this.windowSize.width && next.height === this.windowSize.height) {
return;
}
this.windowSize = next;
logger.debug(`Window resized: ${next.width}x${next.height}`);
}
isFocused(): boolean {