Task: Upgraded deps for electron and other deps in sandbox clinic system software

This commit is contained in:
Sambo Chea 2021-08-09 09:58:19 +07:00
parent b9ccb55bf9
commit afd81b1dfb
2 changed files with 16 additions and 19 deletions

19
main.js
View File

@ -1,14 +1,10 @@
const electron = require("electron");
const { app, BrowserWindow } = electron;
const os = require("os");
const URL = "https://clinic.cubetiqs.com";
const DR_URL =
process.env.DR_URL ||
URL +
"?platform=desktop&offline=true&source=" +
(process.env.USERNAME || "unknown");
const DR_TITLE = "CUBETIQ CLINIC";
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 APP_TITLE = "CUBETIQ CLINIC SYSTEM";
let mainApp;
app.allowRendererProcessReuse = true;
@ -21,15 +17,16 @@ app.on("ready", () => {
mainApp.webContents.executeJavaScript(
`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`
);
mainApp.webContents.executeJavaScript(
`localStorage.setItem("IS_ELECTRON", true)`
);
mainApp.setFullScreen(true);
mainApp.setTitle(DR_TITLE);
mainApp.setTitle(APP_TITLE);
console.log("Starting from:", DR_URL);
mainApp.loadURL(DR_URL);
console.log("Starting from:", MAIN_URL);
mainApp.loadURL(MAIN_URL);
mainApp.on("closed", () => {
mainApp = null;

View File

@ -1,16 +1,16 @@
{
"name": "clinic",
"version": "1.0.0",
"description": "Clinic Application",
"name": "sandbox-clinic",
"version": "1.0.2",
"description": "CUBETIQ Clinic System Management",
"main": "main.js",
"build": {
"productName": "Clinic-Sandbox",
"appId": "com.cubetiqs.clinic",
"mac": {
"category": "com.cubetiqs.pro.clinic"
"category": "com.cubetiqs.clinic"
},
"linux": {
"category": "com.cubetiqs.pro.clinic",
"category": "com.cubetiqs.clinic",
"target": [
"AppImage",
"deb"
@ -22,8 +22,8 @@
},
"devDependencies": {
"cross-env": "^7.0.0",
"electron": "^8.0.0",
"electron-builder": "^22.3.2"
"electron": "^9.4.0",
"electron-builder": "^22.11.7"
},
"scripts": {
"postinstall": "electron-builder install-app-deps",
@ -51,6 +51,6 @@
},
"homepage": "https://github.com/CUBETIQ/sandbox-clinic#readme",
"dependencies": {
"electron-icon-builder": "^1.0.2"
"electron-icon-builder": "^2.0.1"
}
}