Compare commits

..

No commits in common. "0a5bcd76f08d000e9bb5ebe4bb0a01db4004bc0e" and "39a514b2cc64ca2c7a8a8e2fe3d5508fa4dac225" have entirely different histories.

3 changed files with 3 additions and 113 deletions

File diff suppressed because one or more lines are too long

View File

@ -20,7 +20,6 @@
"build-run-web": "npm run build-web & npm run build-service & npm run run-service",
"release-run-web": "npm run release-web & npm run release-service & npm run run-service",
"copy-fluent-icon": "fse mkdirp ./build/font-icon/ & fse emptyDir ./build/font-icon/ & fse copy ./node_modules/@fluentui/font-icons-mdl2/fonts/ ./build/font-icon/",
"copy-loading-page": "fse mkdirp ./build & fse copy ./assets/LoadingPage.html ./build/LoadingPage.html",
"build-run-desktop-web": "npm run build-desktop-web & npm run copy-fluent-icon & npm run build-service & npm run run-service",
"release-run-desktop-web": "npm run release-desktop-web & npm run copy-fluent-icon & npm run release-service & npm run run-service",
"skip-electron-ci": "set ELECTRON_SKIP_BINARY_DOWNLOAD=1& npm ci",
@ -29,8 +28,8 @@
"electron-cache": "set ELECTRON_SKIP_BINARY_DOWNLOAD=& set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/& set ELECTRON_CUSTOM_DIR={{ version }}& node ./node_modules/electron/install.js",
"electron": "set LIVING_TOGETHER_BASE_PATH=./build& set LIVING_TOGETHER_WEB_PATH=/& npx electron ./build/Electron.js",
"hmr-electron": "npm run build-electron & set LIVING_TOGETHER_SERVICE=http://127.0.0.1:12000& npm run electron",
"build-run-electron": "npm run build-desktop-web & npm run copy-fluent-icon & npm run copy-loading-page & npm run build-electron & npm run electron",
"release-run-electron": "npm run release-desktop-web & npm run copy-fluent-icon & npm run copy-loading-page & npm run release-electron & npm run electron",
"build-run-electron": "npm run build-desktop-web & npm run copy-fluent-icon & npm run build-electron & npm run electron",
"release-run-electron": "npm run release-desktop-web & npm run copy-fluent-icon & npm run release-electron & npm run electron",
"copy-package-json": "fse mkdirp ./bundle/ & node ./config/electron.forge.config.js --out ./bundle",
"copy-build-result": "fse mkdirp ./bundle/ & fse mkdirp ./build/ & fse copy ./build/ ./bundle/",
"copy-electron-icon": "fse mkdirp ./bundle/ & fse copy ./assets/living-together.ico ./bundle/living-together.ico & fse copy ./assets/living-together.icns ./bundle/living-together.icns",

View File

@ -29,38 +29,12 @@ class ElectronApp {
);
}
public loadingPage?: BrowserWindow;
public simulatorWindow?: BrowserWindow;
public async showLoadingPage() {
return new Promise((r) => {
this.loadingPage = new BrowserWindow({
width: 603,
height: 432,
fullscreenable: false,
skipTaskbar: true,
resizable: false,
titleBarStyle: 'hidden',
frame: false,
show: false
});
this.loadingPage.loadFile(ENV.LIVING_TOGETHER_LOADING_PAGE ?? "./LoadingPage.html");
this.loadingPage.on("ready-to-show", () => {
this.loadingPage?.show();
r(undefined);
});
});
}
public async runMainThread() {
await app.whenReady();
await this.showLoadingPage();
await this.runService();
let preload = pathJoin(__dirname, "./SimulatorWindow.js");
@ -76,19 +50,11 @@ class ElectronApp {
frame: false,
minWidth: 460,
minHeight: 300,
webPreferences: { preload },
show: false,
webPreferences: { preload }
});
this.simulatorWindow.loadURL(this.serviceUrl + (ENV.LIVING_TOGETHER_WEB_PATH ?? "/resources/app.asar/"));
this.simulatorWindow.on("ready-to-show", () => {
setTimeout(() => {
this.loadingPage?.close();
this.simulatorWindow?.show();
}, 1220);
});
this.handelSimulatorWindowBehavior();
this.handelFileChange();