LosaDev Tools: Lost Saga modding tools in the browser

This commit is contained in:
LosaDev committed 2026-11-07 23:08:43 +07:00
commit c5e04472fb
105 files changed
+38541

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
// "electron" for the ported main-process modules. Only app.getPath is used outside the dialogs
// (which the browser answers in src/legacy/bridge.js). userData is a virtual folder kept in the
// browser's IndexedDB (see vfs.takePersisted / restore).
const PATHS = { userData: "/userdata", temp: "/tmp", downloads: "/out", documents: "/out", desktop: "/out", home: "/out" };
export const app = {
getPath: (name) => PATHS[name] || `/userdata/${name}`,
getVersion: () => "web",
isPackaged: true,
};
const unavailable = (what) => () => {
throw new Error(`${what} is not available in the browser`);
};
export const dialog = { showOpenDialog: unavailable("dialog"), showSaveDialog: unavailable("dialog"), showMessageBox: unavailable("dialog") };
export const shell = { openPath: async () => "", showItemInFolder: () => {}, openExternal: async () => {} };
export const ipcMain = { handle: () => {}, on: () => {} };
export const BrowserWindow = class {};
export default { app, dialog, shell, ipcMain, BrowserWindow };