Task: Add multiple profiles and add lib for custom build profile and fixed in sandbox clinic
This commit is contained in:
parent
afd81b1dfb
commit
57ca98a652
7
.github/workflows/electron-sandbox.yml
vendored
7
.github/workflows/electron-sandbox.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Sandbox Clinic Desktop
|
||||
name: Sandbox Clinic System
|
||||
|
||||
on: [push]
|
||||
|
||||
@ -9,7 +9,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
# os: [windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Starting Context
|
||||
@ -20,10 +19,10 @@ jobs:
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Use Node.js 10.x
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
node-version: 16.x
|
||||
- name: yarn install
|
||||
run: |
|
||||
yarn install
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@ node_modules
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
dist
|
||||
electron-builder.env
|
||||
lib.js
|
@ -1,4 +1,4 @@
|
||||
# CUBETIQ Clinic Application
|
||||
# CUBETIQ Clinic System Management
|
||||
|
||||
![Sandbox Clinic Desktop](https://github.com/CUBETIQ/sandbox-clinic/workflows/Sandbox%20Clinic%20Desktop/badge.svg)
|
||||
|
||||
|
BIN
assets/images/icon.ico
Normal file
BIN
assets/images/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
assets/images/icon.png
Normal file
BIN
assets/images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
9
build.sh
Executable file
9
build.sh
Executable file
@ -0,0 +1,9 @@
|
||||
BUILD_PROFILE=${1:-clinic}
|
||||
echo "Build for profile ${BUILD_PROFILE}"
|
||||
|
||||
cat profile/${BUILD_PROFILE}.env > lib.js
|
||||
|
||||
echo "Verify lib.js"
|
||||
cat lib.js
|
||||
|
||||
yarn dist
|
0
builder-config.yaml
Normal file
0
builder-config.yaml
Normal file
@ -2,10 +2,10 @@
|
||||
"productName": "Clinic-Dev",
|
||||
"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"]
|
||||
},
|
||||
"win": {
|
||||
|
@ -2,10 +2,10 @@
|
||||
"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"]
|
||||
},
|
||||
"win": {
|
||||
|
7
main.js
7
main.js
@ -1,10 +1,11 @@
|
||||
const electron = require("electron");
|
||||
const { app, BrowserWindow } = electron;
|
||||
const os = require("os");
|
||||
const APP_URL = require("./lib");
|
||||
|
||||
const URL = process.env.APP_URL || "https://clinic.cubetiqs.com";
|
||||
const URL = 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";
|
||||
const APP_TITLE = "Clinic System";
|
||||
|
||||
let mainApp;
|
||||
app.allowRendererProcessReuse = true;
|
||||
@ -12,6 +13,8 @@ app.on("ready", () => {
|
||||
mainApp = new BrowserWindow({
|
||||
width: 1024,
|
||||
height: 768,
|
||||
icon: "./assets/images/icon.png",
|
||||
title: APP_TITLE,
|
||||
});
|
||||
|
||||
mainApp.webContents.executeJavaScript(
|
||||
|
@ -3,8 +3,9 @@
|
||||
"version": "1.0.2",
|
||||
"description": "CUBETIQ Clinic System Management",
|
||||
"main": "main.js",
|
||||
"icon": "./assets/images/icon.ico",
|
||||
"build": {
|
||||
"productName": "Clinic-Sandbox",
|
||||
"productName": "Sandbox-Clinic",
|
||||
"appId": "com.cubetiqs.clinic",
|
||||
"mac": {
|
||||
"category": "com.cubetiqs.clinic"
|
||||
@ -17,7 +18,8 @@
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"target": "nsis"
|
||||
"target": "nsis",
|
||||
"icon": "./assets/images/icon.ico"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -27,7 +29,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"start": "yarn && cross-env DR_URL=https://clinic.cubetiqs.com?platform=desktop electron ./main",
|
||||
"start": "yarn && cross-env APP_URL=https://clinic.cubetiqs.com?platform=desktop electron ./main",
|
||||
"pack": "electron-builder --dir",
|
||||
"dist": "electron-builder --publish never",
|
||||
"build-icon": "electron-icon-builder --input=icon.png --output=dist/icons",
|
||||
|
3
profile/clinic.env
Normal file
3
profile/clinic.env
Normal file
@ -0,0 +1,3 @@
|
||||
const APP_URL = 'https://clinic.cubetiqs.com';
|
||||
|
||||
module.exports = APP_URL;
|
3
profile/dr.env
Normal file
3
profile/dr.env
Normal file
@ -0,0 +1,3 @@
|
||||
const APP_URL = 'https://app.drprofessionalglobal.com';
|
||||
|
||||
module.exports = APP_URL;
|
3
profile/em.env
Normal file
3
profile/em.env
Normal file
@ -0,0 +1,3 @@
|
||||
const APP_URL = 'https://app.embeautyclinic.com';
|
||||
|
||||
module.exports = APP_URL;
|
3
profile/kesor.env
Normal file
3
profile/kesor.env
Normal file
@ -0,0 +1,3 @@
|
||||
const APP_URL = 'https://claris.cubetiqs.com';
|
||||
|
||||
module.exports = APP_URL;
|
Loading…
Reference in New Issue
Block a user