From ff05225b56c9dcda59979ff5b46765a81521c174 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 26 Jul 2020 16:25:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgit=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E5=A4=A7=E5=B0=8F=E5=86=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/events/Tray.js | 14 ++++++++++++++ src/main/events/WinLyric.js | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/main/events/Tray.js create mode 100644 src/main/events/WinLyric.js diff --git a/src/main/events/Tray.js b/src/main/events/Tray.js new file mode 100644 index 00000000..39867f43 --- /dev/null +++ b/src/main/events/Tray.js @@ -0,0 +1,14 @@ +const { EventEmitter } = require('events') +const { tray: TRAY_EVENT_NAME } = require('./_name') + +class Tray extends EventEmitter { + create() { + this.emit(TRAY_EVENT_NAME.create) + } + + destroy() { + this.emit(TRAY_EVENT_NAME.destroy) + } +} + +module.exports = Tray diff --git a/src/main/events/WinLyric.js b/src/main/events/WinLyric.js new file mode 100644 index 00000000..66772945 --- /dev/null +++ b/src/main/events/WinLyric.js @@ -0,0 +1,15 @@ +const { EventEmitter } = require('events') +const { winLyric: WIN_LYRIC_EVENT_NAME } = require('./_name') +// const { updateSetting } = require('../utils') + +class WinLyric extends EventEmitter { + create() { + this.emit(WIN_LYRIC_EVENT_NAME.create) + } + + close() { + this.emit(WIN_LYRIC_EVENT_NAME.close) + } +} + +module.exports = WinLyric