mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-09-19 18:45:16 +00:00

Squashed commit of the following: commitf30a8c658a
Author: JEECG <445654970@qq.com> Date: Thu Jul 31 11:35:16 2025 +0800 数据库缺少openapi微服务网关配置 commite84d7726d2
Author: JEECG <445654970@qq.com> Date: Thu Jul 31 10:20:09 2025 +0800 后台接口地址修改 commit0f39802698
Author: JEECG <445654970@qq.com> Date: Thu Jul 31 09:56:24 2025 +0800 docker自动化部署命令 commita014a3ed0e
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 21:55:16 2025 +0800 v3.8.2 优化一键docker启动前后端 commit5720d1a01e
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 19:26:38 2025 +0800 升级版本号到3.8.2 commit5eed6ac6d2
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:49:29 2025 +0800 升级版本号到3.8.2 commit0cfa1e223a
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:28:10 2025 +0800 v3.8.2 系统通知改造支持分类 commit219869f4c0
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:25:58 2025 +0800 v3.8.2 版本前端代码 commite6edde963a
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:25:46 2025 +0800 v3.8.2 版本后端代码 commitc44b66128e
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:23:09 2025 +0800 XXL-JOB(2.4.0 及以上)已被移除,分片参数获取方式变更。 commit9356b04741
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 10:57:52 2025 +0800 升级online到3.8.2-beta commitd0a094f9a3
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 10:57:31 2025 +0800 升级mybatis-plus到3.5.12、升级jsqlparser到4.9 commit73eb625737
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 09:51:34 2025 +0800 升级jimureport到v2.1.1 commit74880705b8
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 09:18:46 2025 +0800 升级online到3.8.2-beta # Conflicts: # jeecg-boot/jeecg-boot-base-core/pom.xml # jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger3Config.java # jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/java/org/jeecg/JeecgSystemApplication.java # jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/pom.xml # jeecg-boot/pom.xml
44 lines
1.4 KiB
Vue
44 lines
1.4 KiB
Vue
import { Tray, ipcMain, BrowserWindow, app, Notification } from 'electron';
|
|
import type { NotificationConstructorOptions, IpcMainInvokeEvent } from 'electron';
|
|
import { openInBrowser } from '../utils';
|
|
import { omit } from 'lodash-es';
|
|
|
|
ipcMain.on('open-in-browser', (event: IpcMainInvokeEvent, url: string) => openInBrowser(url));
|
|
// 处理任务栏闪烁
|
|
ipcMain.on('notify-flash', (event: IpcMainInvokeEvent, count: number = 0) => {
|
|
const win = BrowserWindow.getAllWindows()[0];
|
|
if (!win) return;
|
|
if (win.isFocused()) return;
|
|
if (process.platform === 'win32') {
|
|
// windows
|
|
win.flashFrame(true);
|
|
} else if (process.platform === 'darwin') {
|
|
// Mac
|
|
if (app.dock) {
|
|
app.dock.bounce('informational');
|
|
// 设置角标(未读消息)
|
|
if (count > 0) {
|
|
app.dock.setBadge(count.toString());
|
|
} else {
|
|
app.dock.setBadge('');
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// 通知 (点击通知打开指定页面)
|
|
ipcMain.on('notify-with-path', (event: IpcMainInvokeEvent, options: NotificationConstructorOptions & { path: string }) => {
|
|
const win = BrowserWindow.getAllWindows()[0];
|
|
if (!win) return;
|
|
if (win.isFocused()) return;
|
|
const notification = new Notification({
|
|
...omit(options, 'path'),
|
|
});
|
|
notification.on('click', () => {
|
|
if (win.isMinimized()) win.restore();
|
|
win.show();
|
|
win.focus();
|
|
// win.webContents.send('navigate-to', options.path);
|
|
});
|
|
notification.show();
|
|
});
|