diff --git a/CLAUDE.md b/CLAUDE.md index b9a01a8..996caa3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -147,10 +147,10 @@ 3. 生产反代需规划 admin 域的头像/品牌公开端点:`/api/public/*` 按租户 Host 解析,admin 域直挂必 404——开发期靠 Vite Host 改写代理,生产要么同源反代改 Host(单租户形态)要么前端改用租户域名绝对 URL。 4. `VITE_TENANT_PREVIEW_HOST` 单一预览域名:开发代理只指向一个租户 Host,切换租户时头像等公开资源预览不准(.env.development 已注记)。 5. ~~resolver 平台默认回退链接入 platform_settings~~(Phase 4 Task 5A 完成:`app/platform/settings_store.py` 内存快照 + lifespan 装载 + PUT settings 后 refresh 热刷新;config_views 的 email/ai 两组改三级回退(租户槽位 → 平台设置快照 → env),push 无平台推荐键保持两级;平台设置页"仅存储"注记移除)。 - 6. **email/test 与 push/test 速率限制**(终审 I-3 记档):两测试端点无限流,复用登录限流器模式收口。 - 7. **锁屏功能已摘除入口**(终审 M-1):用户菜单项删除 + 全局组件 enabled:false 不再挂载(AES 存 localStorage + 公开模板默认密钥,防御价值为零);代码待 Phase 4 决定删否。 - 8. **租户切换器 composable 收拢**(终审 M-3 不做记档):仪表盘/会话/配置三页各自内联实现同一模式,收拢归后续。 - 9. **ECharts 按需收窄**(终审 M-4 不做记档):stats 的 plugins/echarts.ts 全量注册,bundle 体积优化归后续。 + 6. ~~email/test 与 push/test 速率限制~~(Phase 4 Task 5B 完成:config_routes 内 `SlidingWindowCounter` 滑动窗限流(登录限流器同款风格),每租户每类端点 15 分钟 5 次真实出站,超限 429;校验失败/未配置 400 不消耗预算,超限后 429 优先于一切预检)。 + 7. ~~锁屏功能已摘除入口~~ + ~~通知组件摘除~~(锁屏 Phase 3 摘入口,Phase 4 Task 5F 删代码:art-screen-lock/art-notification 组件目录、component.ts/headerBar.ts 配置项、useHeaderBar.shouldShowNotification、类型字段、components.d.ts 条目、crypto-js 依赖(env.d.ts 声明/package.json/optimizeDeps/lockfile)、en/zh 孤儿语言键全部清除,grep 零残留)。 + 8. ~~租户切换器 composable 收拢~~(Phase 4 Task 5E 完成:`admin/src/composables/useTenantOptions.ts` 收拢会话/配置/统计三页租户下拉(默认形态选中首个 + bootstrapTenantContext 引导;stats 用 selectFirst:false 纯数据源);dashboard 卡片墙形态不在此列)。 + 9. ~~ECharts 按需收窄~~(Phase 4 Task 5D 完成:echarts.use 收窄为 Bar/Line/Pie + Title/Tooltip/Grid/Legend + CanvasRenderer——全仓 grep 证实存活消费方仅 stats 页与 useChart;echarts chunk 767,864 B → 559,737 B(-27%),dist 总体积 -273 KB)。 ## 文档索引 diff --git a/admin/package.json b/admin/package.json index ae6762f..d63263c 100644 --- a/admin/package.json +++ b/admin/package.json @@ -36,7 +36,6 @@ "@vue/reactivity": "^3.5.21", "@vueuse/core": "^13.9.0", "axios": "^1.12.2", - "crypto-js": "^4.2.0", "echarts": "^6.0.0", "element-plus": "^2.11.2", "mitt": "^3.0.1", diff --git a/admin/pnpm-lock.yaml b/admin/pnpm-lock.yaml index 71e1870..72e4413 100644 --- a/admin/pnpm-lock.yaml +++ b/admin/pnpm-lock.yaml @@ -26,9 +26,6 @@ importers: axios: specifier: ^1.12.2 version: 1.12.2 - crypto-js: - specifier: ^4.2.0 - version: 4.2.0 echarts: specifier: ^6.0.0 version: 6.0.0 @@ -1375,9 +1372,6 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} - crypto-js@4.2.0: - resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} - css-functions-list@3.2.3: resolution: {integrity: sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==} engines: {node: '>=12 || >=16'} @@ -4224,8 +4218,6 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - crypto-js@4.2.0: {} - css-functions-list@3.2.3: {} css-tree@3.1.0: diff --git a/admin/src/components/core/layouts/art-header-bar/index.vue b/admin/src/components/core/layouts/art-header-bar/index.vue index 4e3c8f9..7055b1e 100644 --- a/admin/src/components/core/layouts/art-header-bar/index.vue +++ b/admin/src/components/core/layouts/art-header-bar/index.vue @@ -109,16 +109,6 @@ - - -
-
- - - - @@ -205,7 +192,6 @@ shouldShowBreadcrumb, shouldShowGlobalSearch, shouldShowFullscreen, - shouldShowNotification, shouldShowChat, shouldShowLanguage, shouldShowSettings, @@ -219,9 +205,6 @@ const { language } = storeToRefs(userStore) const { menuList } = storeToRefs(menuStore) - const showNotice = ref(false) - const notice = ref(null) - // 菜单类型判断 const isLeftMenu = computed(() => menuType.value === MenuTypeEnum.LEFT) const isDualMenu = computed(() => menuType.value === MenuTypeEnum.DUAL_MENU) @@ -232,11 +215,6 @@ onMounted(() => { initLanguage() - document.addEventListener('click', bodyCloseNotice) - }) - - onUnmounted(() => { - document.removeEventListener('click', bodyCloseNotice) }) /** @@ -310,31 +288,6 @@ mittBus.emit('openSearchDialog') } - /** - * 点击页面其他区域关闭通知面板 - * @param {Event} e - 点击事件对象 - */ - const bodyCloseNotice = (e: any): void => { - if (!showNotice.value) return - - const target = e.target as HTMLElement - - // 检查是否点击了通知按钮或通知面板内部 - const isNoticeButton = target.closest('.notice-button') - const isNoticePanel = target.closest('.art-notification-panel') - - if (!isNoticeButton && !isNoticePanel) { - showNotice.value = false - } - } - - /** - * 切换通知面板显示状态 - */ - const visibleNotice = (): void => { - showNotice.value = !showNotice.value - } - /** * 打开聊天窗口 */ @@ -457,10 +410,6 @@ animation: shrink 0.6s forwards; } - .notice-button:hover :deep(.art-svg-icon) { - animation: shake 0.5s ease-in-out; - } - .chat-button:hover :deep(.art-svg-icon) { animation: shake 0.5s ease-in-out; } diff --git a/admin/src/components/core/layouts/art-notification/index.vue b/admin/src/components/core/layouts/art-notification/index.vue deleted file mode 100644 index a58853c..0000000 --- a/admin/src/components/core/layouts/art-notification/index.vue +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - diff --git a/admin/src/components/core/layouts/art-screen-lock/index.vue b/admin/src/components/core/layouts/art-screen-lock/index.vue deleted file mode 100644 index d7002a9..0000000 --- a/admin/src/components/core/layouts/art-screen-lock/index.vue +++ /dev/null @@ -1,522 +0,0 @@ - - - - - - diff --git a/admin/src/config/modules/component.ts b/admin/src/config/modules/component.ts index dc0e244..c8d51b4 100644 --- a/admin/src/config/modules/component.ts +++ b/admin/src/config/modules/component.ts @@ -37,17 +37,6 @@ export const globalComponentsConfig: GlobalComponentConfig[] = [ ), enabled: true }, - { - name: '锁屏', - key: 'screen-lock', - component: defineAsyncComponent( - () => import('@/components/core/layouts/art-screen-lock/index.vue') - ), - // 入口已摘除(Phase 3 终审 M-1):锁屏把真实密码 AES 存 localStorage - // 且密钥是公开模板默认值,防御价值为零——enabled: false 连全局挂载 - // 也不注册;组件代码保留,Phase 4 决定删否。 - enabled: false - }, { name: '聊天窗口', key: 'chat-window', diff --git a/admin/src/config/modules/headerBar.ts b/admin/src/config/modules/headerBar.ts index d1c908b..fda1c66 100644 --- a/admin/src/config/modules/headerBar.ts +++ b/admin/src/config/modules/headerBar.ts @@ -38,12 +38,6 @@ export const headerBarConfig: HeaderBarFeatureConfig = { enabled: true, description: '全屏切换功能' }, - notification: { - // 入口已摘除(Phase 3 终审 M-2):模板通知中心是硬编码演示数据, - // 无真实数据源——enabled: false 隐藏铃铛;组件保留,接真数据源时再开。 - enabled: false, - description: '通知中心,显示系统通知和消息' - }, chat: { enabled: true, description: '聊天功能,提供实时沟通' diff --git a/admin/src/env.d.ts b/admin/src/env.d.ts index 73846e2..4b31ada 100644 --- a/admin/src/env.d.ts +++ b/admin/src/env.d.ts @@ -2,7 +2,5 @@ declare module 'nprogress' -declare module 'crypto-js' - // 全局变量声明 declare const __APP_VERSION__: string // 版本号 diff --git a/admin/src/hooks/core/useHeaderBar.ts b/admin/src/hooks/core/useHeaderBar.ts index be10712..46b31f2 100644 --- a/admin/src/hooks/core/useHeaderBar.ts +++ b/admin/src/hooks/core/useHeaderBar.ts @@ -83,11 +83,6 @@ export function useHeaderBar() { return isFeatureEnabled('fullscreen') }) - // 检查通知中心是否显示 - const shouldShowNotification = computed(() => { - return isFeatureEnabled('notification') - }) - // 检查聊天功能是否显示 const shouldShowChat = computed(() => { return isFeatureEnabled('chat') @@ -179,7 +174,6 @@ export function useHeaderBar() { shouldShowBreadcrumb, // 是否显示面包屑 shouldShowGlobalSearch, // 是否显示全局搜索 shouldShowFullscreen, // 是否显示全屏按钮 - shouldShowNotification, // 是否显示通知中心 shouldShowChat, // 是否显示聊天功能 shouldShowLanguage, // 是否显示语言切换 shouldShowSettings, // 是否显示设置面板 diff --git a/admin/src/locales/langs/en.json b/admin/src/locales/langs/en.json index b98b778..0411d48 100644 --- a/admin/src/locales/langs/en.json +++ b/admin/src/locales/langs/en.json @@ -20,7 +20,6 @@ }, "user": { "changePassword": "Change Password", - "lockScreen": "Lock Screen", "logout": "Log Out" }, "guide": { @@ -122,19 +121,6 @@ "resetFailed": "Reset failed, please refresh the page and try again" } }, - "notice": { - "title": "Notice", - "btnRead": "Mark as read", - "bar": [ - "Notice", - "Message", - "Todo" - ], - "text": [ - "No" - ], - "viewAll": "View all" - }, "worktab": { "btn": { "refresh": "Refresh", @@ -167,18 +153,6 @@ "message": "Welcome back" } }, - "lockScreen": { - "pwdError": "Password error", - "lock": { - "inputPlaceholder": "Please input lock screen password", - "btnText": "Lock" - }, - "unlock": { - "inputPlaceholder": "Please input unlock password", - "btnText": "Unlock", - "backBtnText": "Back to login" - } - }, "greeting": { "dawn": "Good morning!", "morning": "Good morning!", diff --git a/admin/src/locales/langs/zh.json b/admin/src/locales/langs/zh.json index cddf7ca..59605a5 100644 --- a/admin/src/locales/langs/zh.json +++ b/admin/src/locales/langs/zh.json @@ -20,7 +20,6 @@ }, "user": { "changePassword": "修改密码", - "lockScreen": "锁定屏幕", "logout": "退出登录" }, "guide": { @@ -122,19 +121,6 @@ "resetFailed": "重置失败,请刷新页面后重试" } }, - "notice": { - "title": "通知", - "btnRead": "标为已读", - "bar": [ - "通知", - "消息", - "代办" - ], - "text": [ - "暂无" - ], - "viewAll": "查看全部" - }, "worktab": { "btn": { "refresh": "刷新", @@ -167,18 +153,6 @@ "message": "欢迎回来" } }, - "lockScreen": { - "pwdError": "密码错误", - "lock": { - "inputPlaceholder": "请输入锁屏密码", - "btnText": "锁定" - }, - "unlock": { - "inputPlaceholder": "请输入解锁密码", - "btnText": "解锁", - "backBtnText": "返回登录" - } - }, "greeting": { "dawn": "凌晨了!", "morning": "上午好!", diff --git a/admin/src/types/config/index.ts b/admin/src/types/config/index.ts index dd144de..13eb3db 100644 --- a/admin/src/types/config/index.ts +++ b/admin/src/types/config/index.ts @@ -198,8 +198,6 @@ export interface HeaderBarFeatureConfig { globalSearch: FeatureConfigItem /** 全屏功能 */ fullscreen: FeatureConfigItem - /** 通知功能 */ - notification: FeatureConfigItem /** 聊天功能 */ chat: FeatureConfigItem /** 多语言切换 */ diff --git a/admin/src/types/import/components.d.ts b/admin/src/types/import/components.d.ts index b9177ab..8c21561 100644 --- a/admin/src/types/import/components.d.ts +++ b/admin/src/types/import/components.d.ts @@ -40,14 +40,12 @@ declare module 'vue' { ArtLogo: typeof import('./../../components/core/base/art-logo/index.vue')['default'] ArtMenuRight: typeof import('./../../components/core/others/art-menu-right/index.vue')['default'] ArtMixedMenu: typeof import('./../../components/core/layouts/art-menus/art-mixed-menu/index.vue')['default'] - ArtNotification: typeof import('./../../components/core/layouts/art-notification/index.vue')['default'] ArtPageContent: typeof import('./../../components/core/layouts/art-page-content/index.vue')['default'] ArtProgressCard: typeof import('./../../components/core/cards/art-progress-card/index.vue')['default'] ArtRadarChart: typeof import('./../../components/core/charts/art-radar-chart/index.vue')['default'] ArtResultPage: typeof import('./../../components/core/views/result/ArtResultPage.vue')['default'] ArtRingChart: typeof import('./../../components/core/charts/art-ring-chart/index.vue')['default'] ArtScatterChart: typeof import('./../../components/core/charts/art-scatter-chart/index.vue')['default'] - ArtScreenLock: typeof import('./../../components/core/layouts/art-screen-lock/index.vue')['default'] ArtSearchBar: typeof import('./../../components/core/forms/art-search-bar/index.vue')['default'] ArtSettingsPanel: typeof import('./../../components/core/layouts/art-settings-panel/index.vue')['default'] ArtSidebarMenu: typeof import('./../../components/core/layouts/art-menus/art-sidebar-menu/index.vue')['default'] diff --git a/admin/src/utils/sys/mittBus.ts b/admin/src/utils/sys/mittBus.ts index 22f0108..ca28b29 100644 --- a/admin/src/utils/sys/mittBus.ts +++ b/admin/src/utils/sys/mittBus.ts @@ -13,7 +13,7 @@ * ## 使用场景 * * - 跨层级组件通信 - * - 全局功能触发(设置、搜索、聊天、锁屏等) + * - 全局功能触发(设置、搜索、聊天等) * - 特效触发(烟花效果) * - 避免 props 层层传递 * @@ -36,7 +36,6 @@ * - openSetting: 打开设置面板 * - openSearchDialog: 打开搜索对话框 * - openChat: 打开聊天窗口 - * - openLockScreen: 打开锁屏 * * @module utils/sys/mittBus * @author Art Design Pro Team @@ -53,8 +52,6 @@ type Events = { openSearchDialog: void // 打开聊天窗口事件 - 无参数 openChat: void - // 打开锁屏事件 - 无参数 - openLockScreen: void } // 创建类型安全的事件总线实例 diff --git a/admin/vite.config.ts b/admin/vite.config.ts index 3a25ff6..e63d482 100644 --- a/admin/vite.config.ts +++ b/admin/vite.config.ts @@ -139,7 +139,6 @@ export default ({ mode }: { mode: string }) => { 'echarts/charts', 'echarts/components', 'echarts/renderers', - 'crypto-js', 'element-plus/es', 'element-plus/es/components/*/style/css', 'element-plus/es/components/*/style/index'