Task: Upgraded deps for electron and other deps in sandbox clinic system software
This commit is contained in:
parent
b9ccb55bf9
commit
afd81b1dfb
19
main.js
19
main.js
@ -1,14 +1,10 @@
|
|||||||
const electron = require("electron");
|
const electron = require("electron");
|
||||||
const { app, BrowserWindow } = electron;
|
const { app, BrowserWindow } = electron;
|
||||||
|
const os = require("os");
|
||||||
|
|
||||||
const URL = "https://clinic.cubetiqs.com";
|
const URL = process.env.APP_URL || "https://clinic.cubetiqs.com";
|
||||||
|
const MAIN_URL = `${URL}?platform=desktop&offline=true&os=${os.platform()}&hostname=${os.hostname()}&arch=${os.arch()}&source=${process.env.USERNAME || "unknown"}`
|
||||||
const DR_URL =
|
const APP_TITLE = "CUBETIQ CLINIC SYSTEM";
|
||||||
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;
|
||||||
@ -21,15 +17,16 @@ app.on("ready", () => {
|
|||||||
mainApp.webContents.executeJavaScript(
|
mainApp.webContents.executeJavaScript(
|
||||||
`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`
|
`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`
|
||||||
);
|
);
|
||||||
|
|
||||||
mainApp.webContents.executeJavaScript(
|
mainApp.webContents.executeJavaScript(
|
||||||
`localStorage.setItem("IS_ELECTRON", true)`
|
`localStorage.setItem("IS_ELECTRON", true)`
|
||||||
);
|
);
|
||||||
|
|
||||||
mainApp.setFullScreen(true);
|
mainApp.setFullScreen(true);
|
||||||
mainApp.setTitle(DR_TITLE);
|
mainApp.setTitle(APP_TITLE);
|
||||||
|
|
||||||
console.log("Starting from:", DR_URL);
|
console.log("Starting from:", MAIN_URL);
|
||||||
mainApp.loadURL(DR_URL);
|
mainApp.loadURL(MAIN_URL);
|
||||||
|
|
||||||
mainApp.on("closed", () => {
|
mainApp.on("closed", () => {
|
||||||
mainApp = null;
|
mainApp = null;
|
||||||
|
16
package.json
16
package.json
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "clinic",
|
"name": "sandbox-clinic",
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"description": "Clinic Application",
|
"description": "CUBETIQ Clinic System Management",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"build": {
|
"build": {
|
||||||
"productName": "Clinic-Sandbox",
|
"productName": "Clinic-Sandbox",
|
||||||
"appId": "com.cubetiqs.clinic",
|
"appId": "com.cubetiqs.clinic",
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "com.cubetiqs.pro.clinic"
|
"category": "com.cubetiqs.clinic"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"category": "com.cubetiqs.pro.clinic",
|
"category": "com.cubetiqs.clinic",
|
||||||
"target": [
|
"target": [
|
||||||
"AppImage",
|
"AppImage",
|
||||||
"deb"
|
"deb"
|
||||||
@ -22,8 +22,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.0",
|
"cross-env": "^7.0.0",
|
||||||
"electron": "^8.0.0",
|
"electron": "^9.4.0",
|
||||||
"electron-builder": "^22.3.2"
|
"electron-builder": "^22.11.7"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
@ -51,6 +51,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/CUBETIQ/sandbox-clinic#readme",
|
"homepage": "https://github.com/CUBETIQ/sandbox-clinic#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-icon-builder": "^1.0.2"
|
"electron-icon-builder": "^2.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user