From 7d88d6053a342a92f8e11ecb26e88090c9f84790 Mon Sep 17 00:00:00 2001 From: Cheng Zhou Date: Tue, 7 Jul 2026 11:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A1=8C=E9=9D=A2=E7=AB=AF?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/desktop-project-plan.md | 3 +- frontend/src/App.vue | 7 +- frontend/src/components/DesktopLayout.vue | 156 ++-- frontend/src/components/FaqCategoryPanel.vue | 80 +- frontend/src/components/FaqList.vue | 175 ++++- .../src/components/Layout.desktop.test.ts | 120 ++- frontend/src/components/WebLayout.vue | 23 +- frontend/src/locales/zh-CN.ts | 1 - .../src/runtime/desktopUiPreferences.test.ts | 27 +- frontend/src/runtime/desktopUiPreferences.ts | 17 +- frontend/src/runtime/index.ts | 4 +- frontend/src/session/sessionManager.test.ts | 59 ++ frontend/src/session/sessionManager.ts | 13 +- frontend/src/styles/main.css | 339 ++++++++- frontend/src/views/Faq.vue | 267 ++++++- .../src/views/documents/DocumentList.test.ts | 23 +- frontend/src/views/documents/DocumentList.vue | 70 +- frontend/src/views/fees/ContractFees.test.ts | 15 + frontend/src/views/fees/ContractFees.vue | 78 +- frontend/src/views/ia/DrugShipments.test.ts | 1 + frontend/src/views/ia/DrugShipments.vue | 44 +- frontend/src/views/ia/EtmfPlaceholder.test.ts | 26 + frontend/src/views/ia/EtmfPlaceholder.vue | 620 +++++++++------ .../src/views/ia/MaterialEquipment.test.ts | 41 + frontend/src/views/ia/MaterialEquipment.vue | 554 ++++++++++++-- frontend/src/views/ia/ProjectMilestones.vue | 27 + frontend/src/views/ia/ProjectOverview.vue | 710 ++++++++++++++++-- .../src/views/ia/SubjectManagement.test.ts | 47 +- frontend/src/views/ia/SubjectManagement.vue | 170 ++++- .../project-overview/EnrollmentBarChart.vue | 100 ++- 30 files changed, 3158 insertions(+), 659 deletions(-) create mode 100644 frontend/src/views/ia/EtmfPlaceholder.test.ts create mode 100644 frontend/src/views/ia/MaterialEquipment.test.ts diff --git a/docs/desktop-project-plan.md b/docs/desktop-project-plan.md index 054cb6f0..fd5b79dd 100644 --- a/docs/desktop-project-plan.md +++ b/docs/desktop-project-plan.md @@ -64,7 +64,7 @@ - `notifications`:隔离 Web 通知与桌面系统通知。 - `updates`:隔离桌面自动更新检查与安装入口。 - `appMetadata`:在可用时提供桌面 App 版本、平台、构建通道。 -- `desktopMenu` 和 `desktopUiPreferences`:承接桌面菜单命令、最近访问和收藏等桌面体验状态。 +- `desktopMenu` 和 `desktopUiPreferences`:承接桌面菜单命令、收藏模块等桌面体验状态。 - `clientRuntime`:作为业务侧获取平台能力的聚合入口。 业务模块应调用这些适配层,而不是直接调用 Tauri API。Tauri command 应保持窄职责,不包含 CTMS 业务规则。 @@ -156,6 +156,7 @@ 已补齐的桌面体验收口: - 个人中心新增客户端诊断信息展示与复制能力,内容仅包含客户端类型、版本、平台、构建通道、提交、服务器和能力状态,不包含 token 或业务敏感数据。 +- 桌面侧栏已移除被动“最近访问”入口和对应本地记录,只保留用户主动维护的收藏入口;收藏仅保存路由元数据,不保存业务数据或敏感凭据。 - 登录页、服务器设置页、个人中心和系统偏好增加最小窗口布局约束,长服务器地址、健康检查 URL、诊断值和更新/通知状态说明均可在容器内换行。 - 服务器设置页和个人中心在内容高度超过窗口时使用内部滚动,避免 `1180x760` 下对话框或面板溢出。 - 通知权限运行时已区分 WebView `Notification.permission` 的授权、拒绝和待授权状态;取消 macOS 权限请求时继续保持“待授权”,避免错误显示为“已拒绝”。 diff --git a/frontend/src/App.vue b/frontend/src/App.vue index da554f13..5d616ce9 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -13,8 +13,13 @@ import { initDesktopUpdateManager } from "./session/desktopUpdateManager"; import { applyDesktopThemePreference, isTauriRuntime } from "./runtime"; import SessionTimeoutPrompt from "./components/SessionTimeoutPrompt.vue"; -if (isTauriRuntime()) { +const isDesktopRuntime = isTauriRuntime(); + +if (isDesktopRuntime) { applyDesktopThemePreference(); + document.body.classList.add("is-desktop-runtime"); +} else { + document.body.classList.remove("is-desktop-runtime"); } initSessionManager(); initDesktopNotificationManager(); diff --git a/frontend/src/components/DesktopLayout.vue b/frontend/src/components/DesktopLayout.vue index 001f8f12..ba180068 100644 --- a/frontend/src/components/DesktopLayout.vue +++ b/frontend/src/components/DesktopLayout.vue @@ -3,32 +3,30 @@