Skip to content

Commit

Permalink
fix: add notification min
Browse files Browse the repository at this point in the history
  • Loading branch information
frankcbliu committed Nov 30, 2020
1 parent 0598750 commit 62616ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,15 @@ let mb = menubar({
'width': 380,
'height': 420,
'transparent': true,
// 'resizable': false,
'skipTaskbar': true,
'resizable': false,
'webPreferences': {
'nodeIntegration': true,
'enableRemoteModule': true
}
}
})

// 隐藏 Dock 栏
app.dock.hide()

// 开机自动登录
var launch = new AutoLaunch({
name: 'TimeManager',
Expand Down Expand Up @@ -121,7 +119,8 @@ function openSettingWindow () {
x: 100,
y: 100,
useContentSize: true,
// resizable: false,
skipTaskbar: true,
resizable: false,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
Expand All @@ -148,7 +147,7 @@ function openCompleteWindow () {
x: 520,
y: 180,
useContentSize: true,
// resizable: false,
resizable: false,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
Expand All @@ -165,7 +164,13 @@ function openCompleteWindow () {
// 启动程序时检测一遍
checkAutoLaunch()

mb.on('after-show', function create () {
mb.app.dock.hide()
monsole.log('after-show')
})

mb.on('ready', function ready () {
mb.showWindow()
monsole.log('app is ready')
// openCompleteWindow()
})
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/TomatoClock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export default {
notifier.notify(
{
title: '番茄钟已完成!',
message: '专注了 xx 分钟! 你真棒',
message: `专注了 ${that.clockData.begin_work_time} 分钟! 你真棒! `,
sound: 'default',
wait: true,
// icon: require('../assets/notification.png'), // 图标
Expand Down

0 comments on commit 62616ce

Please sign in to comment.