feat: implemented a basic store and emulatorjs

This commit is contained in:
Simeon Radivoev 2026-03-14 02:15:57 +02:00
parent 2f32cbc730
commit 7286541822
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
121 changed files with 5900 additions and 1092 deletions

View file

@ -1,4 +1,4 @@
import { SERVER_URL } from "@/shared/constants";
import { SERVER_URL } from "@shared/constants";
import { host } from "../utils/host";
export default function (webview: { navigate: (url: string) => void; run: () => void; destroy: () => void; })
@ -14,4 +14,5 @@ export default function (webview: { navigate: (url: string) => void; run: () =>
};
webview.navigate(SERVER_URL(host));
webview.run();
postMessage({ data: 'destroyed' });
}

View file

@ -1,4 +1,4 @@
import { Webview } from 'webview-bun';
import { Size, SizeHint, Webview } from 'webview-bun';
import webviewWorkerBase from "./base";
if (process.env.FLATPAK_BUILD === "true")
@ -28,6 +28,9 @@ if (process.env.FLATPAK_BUILD === "true")
} else
{
console.log("Launching Webview");
const webview = new Webview(import.meta.env.NODE_ENV === 'development');
let size: Size | undefined = undefined;
if (process.env.WINDOW_WIDTH && process.env.WINDOW_HEIGHT)
size = { width: Number(process.env.WINDOW_WIDTH), height: Number(process.env.WINDOW_HEIGHT), hint: SizeHint.NONE };
const webview = new Webview(process.env.NODE_ENV === 'development', size);
webviewWorkerBase(webview);
}

View file

@ -1,6 +1,9 @@
import { Webview } from 'webview-bun';
import { Size, SizeHint, Webview } from 'webview-bun';
import webviewWorkerBase from "./base";
const webview = new Webview(import.meta.env.NODE_ENV === 'development');
let size: Size | undefined = undefined;
if (process.env.WINDOW_WIDTH && process.env.WINDOW_HEIGHT)
size = { width: Number(process.env.WINDOW_WIDTH), height: Number(process.env.WINDOW_HEIGHT), hint: SizeHint.NONE };
const webview = new Webview(process.env.NODE_ENV === 'development', size);
webviewWorkerBase(webview);