mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
feat: window客户端任务栏闪烁
This commit is contained in:
parent
b47b3b4b3a
commit
473eaa040f
10
electron/electron.js
vendored
10
electron/electron.js
vendored
@ -391,10 +391,18 @@ ipcMain.on('sendForwardMain', (event, args) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置Dock标记
|
* 设置Dock标记(window闪烁、macos标记)
|
||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
ipcMain.on('setDockBadge', (event, args) => {
|
ipcMain.on('setDockBadge', (event, args) => {
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
// Window flash
|
||||||
|
if (!mainWindow.isFocused()) {
|
||||||
|
mainWindow.once('focus', () => mainWindow.flashFrame(false))
|
||||||
|
mainWindow.flashFrame(true)
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
// Mac only
|
// Mac only
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user