diff --git a/package.json b/package.json index e714179c..3dd3d08e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ScriptHaus", + "name": "Prompt", "version": "1.0.0", "main": "dist/emain.js", "license": "Proprietary", diff --git a/src/emain.ts b/src/emain.ts index a81bc704..b6d12f4c 100644 --- a/src/emain.ts +++ b/src/emain.ts @@ -14,6 +14,7 @@ const ScriptHausAppPathVarName = "SCRIPTHAUS_APP_PATH"; let isDev = (process.env.SH_DEV != null); let scHome = getScHomeDir(); ensureDir(scHome); +let DistDir = (isDev ? "dist-dev" : "dist"); // these are either "darwin/amd64" or "darwin/arm64" // normalize darwin/x64 to darwin/amd64 for GOARCH compatibility @@ -91,7 +92,7 @@ function ensureDir(dir) { } let app = electron.app; -app.setName("ScriptHaus"); +app.setName("Prompt"); let lock : File; try { @@ -144,10 +145,11 @@ function createMainWindow(clientData) { width: bounds.width, height: bounds.height, webPreferences: { - preload: path.join(getAppBasePath(), "dist", "preload.js"), + preload: path.join(getAppBasePath(), DistDir, "preload.js"), }, }); - win.loadFile(path.join(getAppBasePath(), "static", "index.html")); + let indexHtml = (isDev ? "index-dev.html" : "index.html"); + win.loadFile(path.join(getAppBasePath(), "static", indexHtml)); win.webContents.on("before-input-event", (e, input) => { if (input.type != "keyDown") { return; diff --git a/static/index-dev.html b/static/index-dev.html new file mode 100644 index 00000000..d7ca2f9a --- /dev/null +++ b/static/index-dev.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + +
+ + diff --git a/static/index.html b/static/index.html index 9bc635d6..50514144 100644 --- a/static/index.html +++ b/static/index.html @@ -1,12 +1,13 @@ + - + - +