added --hidden startup option (fixes #488)

This commit is contained in:
Eugene Pankov
2018-11-11 13:24:27 +01:00
parent 64fc36df51
commit 702d29b5b4
6 changed files with 59 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
import { app, ipcMain, Menu, Tray, shell } from 'electron'
import { loadConfig } from './config'
import { Window } from './window'
import { Window, WindowOptions } from './window'
export class Application {
private tray: Tray
@@ -20,8 +20,8 @@ export class Application {
app.commandLine.appendSwitch('disable-http-cache')
}
async newWindow (): Promise<Window> {
let window = new Window()
async newWindow (options?: WindowOptions): Promise<Window> {
let window = new Window(options)
this.windows.push(window)
window.visible$.subscribe(visible => {
if (visible) {