feat: implemented a basic store and emulatorjs
This commit is contained in:
parent
2f32cbc730
commit
7286541822
121 changed files with 5900 additions and 1092 deletions
|
|
@ -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' });
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue