mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix electron dep issue in the server version, closes #784
This commit is contained in:
parent
1ff124dab7
commit
7a416b107b
@ -1,4 +1,4 @@
|
|||||||
FROM node:12.13.1-alpine
|
FROM node:12.14.0-alpine
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PKG_DIR=dist/trilium-linux-x64-server
|
PKG_DIR=dist/trilium-linux-x64-server
|
||||||
NODE_VERSION=12.13.1
|
NODE_VERSION=12.14.0
|
||||||
|
|
||||||
if [ "$1" != "DONTCOPY" ]
|
if [ "$1" != "DONTCOPY" ]
|
||||||
then
|
then
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
const {BrowserWindow} = require('electron');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const url = require("url");
|
const url = require("url");
|
||||||
const port = require('./port');
|
const port = require('./port');
|
||||||
const optionService = require('./options');
|
const optionService = require('./options');
|
||||||
const env = require('./env');
|
const env = require('./env');
|
||||||
const windowStateKeeper = require('electron-window-state');
|
|
||||||
|
|
||||||
// Prevent window being garbage collected
|
// Prevent window being garbage collected
|
||||||
/** @type {Electron.BrowserWindow} */
|
/** @type {Electron.BrowserWindow} */
|
||||||
@ -13,12 +11,15 @@ let mainWindow;
|
|||||||
let setupWindow;
|
let setupWindow;
|
||||||
|
|
||||||
async function createMainWindow() {
|
async function createMainWindow() {
|
||||||
|
const windowStateKeeper = require('electron-window-state'); // should not be statically imported
|
||||||
|
|
||||||
const mainWindowState = windowStateKeeper({
|
const mainWindowState = windowStateKeeper({
|
||||||
// default window width & height so it's usable on 1600 * 900 display (including some extra panels etc.)
|
// default window width & height so it's usable on 1600 * 900 display (including some extra panels etc.)
|
||||||
defaultWidth: 1200,
|
defaultWidth: 1200,
|
||||||
defaultHeight: 800
|
defaultHeight: 800
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const {BrowserWindow} = require('electron'); // should not be statically imported
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
x: mainWindowState.x,
|
x: mainWindowState.x,
|
||||||
y: mainWindowState.y,
|
y: mainWindowState.y,
|
||||||
@ -61,6 +62,7 @@ function getIcon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createSetupWindow() {
|
async function createSetupWindow() {
|
||||||
|
const {BrowserWindow} = require('electron'); // should not be statically imported
|
||||||
setupWindow = new BrowserWindow({
|
setupWindow = new BrowserWindow({
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 800,
|
height: 800,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user