diff --git a/README.md b/README.md index 746a3e7e3..f7576bea9 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Ukraine is currently defending itself from Russian aggression, please consider [ * there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting) * [Sharing](https://github.com/zadam/trilium/wiki/Sharing) (publishing) notes to public internet * Strong [note encryption](https://github.com/zadam/trilium/wiki/Protected-notes) with per-note granularity -* Sketching diagrams with bult-in Excalidraw (note type "canvas") +* Sketching diagrams with built-in Excalidraw (note type "canvas") * [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map) for visualizing notes and their relations * [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - see [Advanced showcases](https://github.com/zadam/trilium/wiki/Advanced-showcases) * [REST API](https://github.com/zadam/trilium/wiki/ETAPI) for automation diff --git a/electron.js b/electron.js index 4dcce6cf3..01f1748ed 100644 --- a/electron.js +++ b/electron.js @@ -1,6 +1,6 @@ 'use strict'; -const {app, globalShortcut} = require('electron'); +const {app, globalShortcut, BrowserWindow} = require('electron'); const sqlInit = require('./src/services/sql_init'); const appIconService = require('./src/services/app_icon'); const windowService = require('./src/services/window'); @@ -32,6 +32,14 @@ app.on('ready', async () => { await windowService.createMainWindow(app); + if (process.platform === 'darwin') { + app.on('activate', async () => { + if (BrowserWindow.getAllWindows().length === 0) { + await windowService.createMainWindow(app); + } + }); + } + tray.createTray(); } else {