diff --git a/src/config/constants.js b/src/config/constants.js index c63ff2f8..73ebe76d 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -12,6 +12,11 @@ const boolFromEnv = (key: string): boolean => { const stringFromEnv = (key: string, def: string): string => process.env[key] || def +// Size + +export const MIN_HEIGHT = intFromEnv('LEDGER_MIN_HEIGHT', 768) +export const MIN_WIDTH = intFromEnv('LEDGER_MIN_WIDTH', 1024) + // time and delays... export const GET_CALLS_TIMEOUT = intFromEnv('GET_CALLS_TIMEOUT', 30 * 1000) diff --git a/src/main/app.js b/src/main/app.js index 116a4307..65a224ac 100644 --- a/src/main/app.js +++ b/src/main/app.js @@ -2,6 +2,7 @@ import { app, BrowserWindow, Menu, screen } from 'electron' import debounce from 'lodash/debounce' +import { MIN_HEIGHT, MIN_WIDTH } from 'config/constants' import menu from 'main/menu' import db from 'helpers/db' @@ -67,9 +68,6 @@ const defaultWindowOptions = { } function createMainWindow() { - const MIN_HEIGHT = 768 - const MIN_WIDTH = 1024 - const savedDimensions = db.getIn('settings', 'window.MainWindow.dimensions', {}) const savedPositions = db.getIn('settings', 'window.MainWindow.positions', null)