diff --git a/electron/main.js b/electron/main.js index b6892a8..2692715 100644 --- a/electron/main.js +++ b/electron/main.js @@ -12,6 +12,13 @@ const path = require('path'); const url = require('url'); const { initialStorageEvents, storage } = require('./storage'); +const gotTheLock = app.requestSingleInstanceLock(); + +if (!gotTheLock) { + app.quit(); + return; +} + let mainWindow; const isDev = process.env.NODE_ENV === 'development'; diff --git a/src/app.ts b/src/app.ts index f5c1a16..bfeb805 100644 --- a/src/app.ts +++ b/src/app.ts @@ -147,3 +147,8 @@ export async function getInitialState(): Promise<{ // 链接socket initialWebsocket(); + +// 消息通知配置 +notification.config({ + top: 48 + 10, +});