add session to id of clinic

This commit is contained in:
Sambo Chea 2020-02-13 14:34:09 +07:00
parent 3b07b3ab5b
commit 58da225b04
3 changed files with 25 additions and 12 deletions

25
main.js
View File

@ -1,24 +1,25 @@
const electron = require("electron"); const electron = require("electron");
const { app, BrowserWindow } = electron; const { app, BrowserWindow, session } = electron;
const Store = require("electron-store");
let mainWindow; let mainApp;
const store = new Store();
store.set('unicorn', '🦄'); app.allowRendererProcessReuse = true;
console.log(store.get('unicorn'));
app.on("ready", () => { app.on("ready", () => {
mainWindow = new BrowserWindow({
mainApp = new BrowserWindow({
width: 1000, width: 1000,
height: 700 height: 700
}); });
mainWindow.setFullScreen(true) mainApp.webContents.executeJavaScript(`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`)
mainWindow.setTitle("DR PROFESSIONAL CLINIC"); mainApp.webContents.executeJavaScript(`localStorage.setItem("IS_ELECTRON", true)`)
mainWindow.loadURL("http://clinic.cubetiq.online");
mainWindow.on("closed", () => { mainApp.setFullScreen(true)
mainWindow = null; mainApp.setTitle("DR PROFESSIONAL CLINIC");
mainApp.loadURL("http://clinic.cubetiq.online");
mainApp.on("closed", () => {
mainApp = null;
}); });
}); });

View File

@ -20,6 +20,8 @@
} }
}, },
"dependencies": { "dependencies": {
"electron-browser-storage": "^1.0.6",
"electron-localstorage": "^1.0.5",
"electron-store": "^5.1.0" "electron-store": "^5.1.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -508,6 +508,11 @@ ejs@^3.0.1:
resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.0.1.tgz#30c8f6ee9948502cc32e85c37a3f8b39b5a614a5" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.0.1.tgz#30c8f6ee9948502cc32e85c37a3f8b39b5a614a5"
integrity sha512-cuIMtJwxvzumSAkqaaoGY/L6Fc/t6YvoP9/VIaK0V/CyqKLEQ8sqODmYfy/cjXEdZ9+OOL8TecbJu+1RsofGDw== integrity sha512-cuIMtJwxvzumSAkqaaoGY/L6Fc/t6YvoP9/VIaK0V/CyqKLEQ8sqODmYfy/cjXEdZ9+OOL8TecbJu+1RsofGDw==
electron-browser-storage@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/electron-browser-storage/-/electron-browser-storage-1.0.6.tgz#1507be52a38c726f9d3f138c79260bbee58f4f87"
integrity sha512-ap986HDJNPAangFsG0w0KWMal2GSOXEShMXho5Ory9XG+u2CIfP76nI1yruSemTCvDr+Rg4zpC8Ec9S349eUgw==
electron-builder@^22.3.2: electron-builder@^22.3.2:
version "22.3.2" version "22.3.2"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-22.3.2.tgz#902d150fc0670cb90213262e5e0aa3c4f299ffa4" resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-22.3.2.tgz#902d150fc0670cb90213262e5e0aa3c4f299ffa4"
@ -527,6 +532,11 @@ electron-builder@^22.3.2:
update-notifier "^4.0.0" update-notifier "^4.0.0"
yargs "^15.1.0" yargs "^15.1.0"
electron-localstorage@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/electron-localstorage/-/electron-localstorage-1.0.5.tgz#910df498b3b125519a00accc99cd770275978822"
integrity sha512-wmEcjZdyFI1YFlCtU8g8JP0FJ02WuIrUyNwxu0Mn7Be5YiFowuejeudgWMTaa2zd2qJlQCLmA3bj8pydIoti7Q==
electron-publish@22.3.2: electron-publish@22.3.2:
version "22.3.2" version "22.3.2"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.3.2.tgz#d2e60caf7a9643fe57e501c20acaf32c737b1c50" resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.3.2.tgz#d2e60caf7a9643fe57e501c20acaf32c737b1c50"