mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
#12: dist build
This commit is contained in:
parent
319b39db32
commit
c127e2bcbe
9 changed files with 1212 additions and 80 deletions
12
electron.js
12
electron.js
|
@ -1,7 +1,9 @@
|
|||
const electron = require('electron');
|
||||
const { app, BrowserWindow, ipcMain, shell } = require('electron');
|
||||
const { is, appMenu } = require('electron-util');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
const userDataPath = app.getPath('userData');
|
||||
|
||||
function createWindow () {
|
||||
const { width, height } = electron.screen.getPrimaryDisplay().workAreaSize;
|
||||
|
@ -27,12 +29,16 @@ function createWindow () {
|
|||
);
|
||||
*/
|
||||
|
||||
win.loadURL('http://localhost:8080');
|
||||
//win.loadFile('dist/index.html');
|
||||
win.toggleDevTools();
|
||||
if (is.development) {
|
||||
win.loadURL('http://localhost:8080');
|
||||
win.toggleDevTools();
|
||||
} else {
|
||||
win.loadFile('dist/index.html');
|
||||
};
|
||||
|
||||
ipcMain.on('appLoaded', () => {
|
||||
console.log('appLoaded');
|
||||
win.webContents.send('userDataPath', userDataPath);
|
||||
});
|
||||
|
||||
ipcMain.on('appClose', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue