updated build and remove some unused
This commit is contained in:
parent
90868221b5
commit
98dca413e6
@ -1 +0,0 @@
|
|||||||
DR_URL=https://clinic-dev.cubetiqs.com?platform=desktop
|
|
@ -1 +0,0 @@
|
|||||||
DR_URL=https://clinic.cubetiqs.com?platform=desktop
|
|
29
main.js
29
main.js
@ -1,25 +1,34 @@
|
|||||||
const electron = require("electron");
|
const electron = require("electron");
|
||||||
const { app, BrowserWindow } = electron;
|
const { app, BrowserWindow } = electron;
|
||||||
|
|
||||||
const DR_URL = process.env.DR_URL || "https://clinic.cubetiqs.com?platform=desktop&offline=true&source=" + (process.env.USERNAME || "unknown");
|
const URL = "https://app.drprofessionalglobal.com";
|
||||||
const DR_TITLE = "CUBETIQ CLINIC"
|
|
||||||
|
const DR_URL =
|
||||||
|
process.env.DR_URL ||
|
||||||
|
URL +
|
||||||
|
"?platform=desktop&offline=true&source=" +
|
||||||
|
(process.env.USERNAME || "unknown");
|
||||||
|
const DR_TITLE = "CUBETIQ CLINIC";
|
||||||
|
|
||||||
let mainApp;
|
let mainApp;
|
||||||
app.allowRendererProcessReuse = true;
|
app.allowRendererProcessReuse = true;
|
||||||
app.on("ready", () => {
|
app.on("ready", () => {
|
||||||
|
|
||||||
mainApp = new BrowserWindow({
|
mainApp = new BrowserWindow({
|
||||||
width: 1000,
|
width: 1024,
|
||||||
height: 700
|
height: 768,
|
||||||
});
|
});
|
||||||
|
|
||||||
mainApp.webContents.executeJavaScript(`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`)
|
mainApp.webContents.executeJavaScript(
|
||||||
mainApp.webContents.executeJavaScript(`localStorage.setItem("IS_ELECTRON", true)`)
|
`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`
|
||||||
|
);
|
||||||
mainApp.setFullScreen(true)
|
mainApp.webContents.executeJavaScript(
|
||||||
|
`localStorage.setItem("IS_ELECTRON", true)`
|
||||||
|
);
|
||||||
|
|
||||||
|
mainApp.setFullScreen(true);
|
||||||
mainApp.setTitle(DR_TITLE);
|
mainApp.setTitle(DR_TITLE);
|
||||||
|
|
||||||
console.log("Starting from:", DR_URL)
|
console.log("Starting from:", DR_URL);
|
||||||
mainApp.loadURL(DR_URL);
|
mainApp.loadURL(DR_URL);
|
||||||
|
|
||||||
mainApp.on("closed", () => {
|
mainApp.on("closed", () => {
|
||||||
|
13
package.json
13
package.json
@ -11,12 +11,15 @@
|
|||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"category": "com.cubetiqs.pro.clinic",
|
"category": "com.cubetiqs.pro.clinic",
|
||||||
"target": ["AppImage", "deb"]
|
"target": [
|
||||||
|
"AppImage",
|
||||||
|
"deb"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
"target": "nsis"
|
"target": "nsis"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.0",
|
"cross-env": "^7.0.0",
|
||||||
"electron": "^8.0.0",
|
"electron": "^8.0.0",
|
||||||
@ -27,6 +30,7 @@
|
|||||||
"start": "yarn && cross-env DR_URL=https://clinic.cubetiqs.com?platform=desktop electron ./main",
|
"start": "yarn && cross-env DR_URL=https://clinic.cubetiqs.com?platform=desktop electron ./main",
|
||||||
"pack": "electron-builder --dir",
|
"pack": "electron-builder --dir",
|
||||||
"dist": "electron-builder --publish never",
|
"dist": "electron-builder --publish never",
|
||||||
|
"build-icon": "electron-icon-builder --input=icon.png --output=dist/icons",
|
||||||
"builder-help": "electron-builder --help",
|
"builder-help": "electron-builder --help",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
@ -45,5 +49,8 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/CUBETIQ/sandbox-clinic/issues"
|
"url": "https://github.com/CUBETIQ/sandbox-clinic/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/CUBETIQ/sandbox-clinic#readme"
|
"homepage": "https://github.com/CUBETIQ/sandbox-clinic#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"electron-icon-builder": "^1.0.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user