feat: 新增通知推送功能及离线登录,优化重连逻辑

- 新增通知推送模块:支持 WebSocket 实时推送与轮询兜底,新增通知管理界面
- 新增离线登录功能:断网时凭本地 7 天授权票据自动登录或手动登录
- 优化 Electron 客户端 WebSocket 重连逻辑,避免死循环
- 调整工作流脚本,拆分重构合同相关分支逻辑
- 新增设备上报客户端版本字段,用于升级追踪与关旧依据
This commit is contained in:
2026-10-13 17:46:49 +08:00
parent 816af4b960
commit 872d3dc5c8
38 changed files with 2113 additions and 388 deletions
+9 -1
View File
@@ -49,7 +49,7 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { ArrowDown, Lock, SwitchButton, Odometer, TrendCharts, Box, User, Key, Document, Files } from '@element-plus/icons-vue'
import { ArrowDown, Lock, SwitchButton, Odometer, TrendCharts, Box, User, Key, Document, Files, Monitor, Bell } from '@element-plus/icons-vue'
import { ElMessage as message } from 'element-plus'
import LoginPage from './components/LoginPage.vue'
import PasswordDialog from './components/PasswordDialog.vue'
@@ -61,12 +61,16 @@ import StatsView from './views/StatsView.vue'
import AuditView from './views/AuditView.vue'
import CredsManageView from './views/CredsManageView.vue'
import FileSourceManageView from './views/FileSourceManageView.vue'
import UpgradeView from './views/UpgradeView.vue'
import NotifyManageView from './views/NotifyManageView.vue'
import { store, clearSession } from './store'
import { adminMe } from './api'
const menuOptions = [
{ label: '概览', key: 'overview', icon: Odometer },
{ label: '数据看板', key: 'stats', icon: TrendCharts },
{ label: '升级进度', key: 'upgrade', icon: Monitor, admin: true },
{ label: '通知推送', key: 'notify', icon: Bell, admin: true },
{ label: '插件管理', key: 'plugins', icon: Box },
{ label: '账号管理', key: 'accounts', icon: User },
{ label: '权限授权', key: 'grants', icon: Key },
@@ -80,6 +84,8 @@ const menu = computed(() => menuOptions.filter(m => !m.admin || store.isAdmin))
const KEY = {
'#/overview': 'overview',
'#/stats': 'stats',
'#/upgrade': 'upgrade',
'#/notify': 'notify',
'#/plugins': 'plugins',
'#/accounts': 'accounts',
'#/grants': 'grants',
@@ -90,6 +96,8 @@ const KEY = {
const VIEWS = {
'#/overview': OverviewView,
'#/stats': StatsView,
'#/upgrade': UpgradeView,
'#/notify': NotifyManageView,
'#/plugins': PluginManageView,
'#/accounts': AccountManageView,
'#/grants': GrantManageView,