added web app as submodule
This commit is contained in:
parent
47e7a9eccf
commit
8b85ed506b
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
node_modules
|
||||
app
|
||||
.next/
|
||||
dist
|
||||
.vscode
|
||||
buildingSteps.md
|
||||
|
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
[submodule "bada-frame"]
|
||||
path = bada-frame
|
||||
url = https://github.com/ente-io/bada-frame
|
||||
branch = desktop-app
|
1
bada-frame
Submodule
1
bada-frame
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 0457c3c530dec04a52cdd8fb5a6c927535c7ce24
|
|
@ -40,7 +40,7 @@
|
|||
"build": "tsc",
|
||||
"watch": "tsc -w",
|
||||
"lint": "eslint -c .eslintrc --ext .ts ./src",
|
||||
"start": "yarn build && electron ./app/main.js",
|
||||
"start": "concurrently \"yarn build && electron ./app/main.js\" \"cd bada-frame && yarn dev\"",
|
||||
"test-release": "yarn build && electron-builder",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
|
@ -49,6 +49,7 @@
|
|||
"@sentry/cli": "^1.68.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.28.0",
|
||||
"@typescript-eslint/parser": "^5.28.0",
|
||||
"concurrently": "^7.0.0",
|
||||
"electron": "^15.3.0",
|
||||
"electron-builder": "^23.0.3",
|
||||
"electron-builder-notarize": "^1.2.0",
|
||||
|
@ -70,6 +71,7 @@
|
|||
"electron-store": "^8.0.1",
|
||||
"electron-updater": "^4.3.8",
|
||||
"node-stream-zip": "^1.15.0",
|
||||
"next-electron-server": "^0.0.8",
|
||||
"promise-fs": "^2.1.1"
|
||||
},
|
||||
"standard": {
|
||||
|
|
|
@ -35,10 +35,15 @@ export const setIsUpdateAvailable = (value: boolean): void => {
|
|||
updateIsAvailable = value;
|
||||
};
|
||||
|
||||
const serveNextAt = require('next-electron-server');
|
||||
serveNextAt('next://app', {
|
||||
outputDir: './bada-frame/out',
|
||||
});
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
if (!gotTheLock) {
|
||||
app.quit();
|
||||
} else {
|
||||
app.commandLine.appendSwitch('enable-features', 'SharedArrayBuffer');
|
||||
app.on('second-instance', () => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (mainWindow) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { app, BrowserWindow, nativeImage } from 'electron';
|
||||
import * as path from 'path';
|
||||
import { isDev } from './common';
|
||||
import { PROD_HOST_URL } from '../config';
|
||||
import { isAppQuitting } from '../main';
|
||||
|
||||
export function createWindow(): BrowserWindow {
|
||||
|
@ -31,14 +30,14 @@ export function createWindow(): BrowserWindow {
|
|||
|
||||
if (isDev) {
|
||||
splash.loadFile(`../build/splash.html`);
|
||||
mainWindow.loadURL('http://localhost:3000');
|
||||
mainWindow.loadURL('next://app');
|
||||
// Open the DevTools.
|
||||
mainWindow.webContents.openDevTools();
|
||||
} else {
|
||||
splash.loadURL(
|
||||
`file://${path.join(process.resourcesPath, 'splash.html')}`
|
||||
);
|
||||
mainWindow.loadURL(PROD_HOST_URL);
|
||||
mainWindow.loadURL('next://app');
|
||||
}
|
||||
mainWindow.webContents.on('did-fail-load', () => {
|
||||
splash.close();
|
||||
|
|
Loading…
Reference in a new issue