From aa3743b42deff02dae1a982cefb574746ac2c5a2 Mon Sep 17 00:00:00 2001 From: Orion Date: Tue, 21 Jul 2026 16:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20=E5=85=A8=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96=202026=20=E5=89=8D=E7=AB=AF=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=BC=8F=E4=BD=93=E9=AA=8C=E4=B8=8E=E5=8A=A0=E8=BD=BD=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成 FileCodeBox 2026 全站桌面端、平板和移动端的视觉交互复核,补齐文件选择后的批量操作闭环,并降低公共首屏的字体与低频依赖成本。 - 为移动文件列表增加全选、已选数量、批量编辑、策略与删除固定栏,并补充详情删除和空筛选重置 - 优化设置保存栏、分区导航、发送过期控件、仪表盘日期与图表操作、分页和记录抽屉 - 为后台侧栏增加遮罩、滚动锁定、Escape 关闭和焦点返回,完善登录密码可见性与国际化 - 移除全站强制 DingTalk 字体,按需加载 JSZip、Marked 和 DOMPurify,并停止空闲提示定时器 - 已通过架构检查、Vue 类型检查、ESLint、生产构建、48 组多视口明暗模式矩阵及核心流程回归 --- src/App.vue | 9 +- src/assets/style/main.css | 15 +- src/components/common/AlertComponent.vue | 10 +- src/components/common/DataPagination.vue | 25 ++- src/components/common/ExpirationSelector.vue | 217 ++++++------------- src/components/common/FileRecordList.vue | 120 +++------- src/components/common/FileUploadArea.vue | 5 +- src/components/common/NativeDateSelect.vue | 19 +- src/components/common/PageFooter.vue | 4 +- src/components/common/SentRecordList.vue | 113 +++------- src/components/common/StatCard.vue | 2 +- src/composables/useAdminLogin.ts | 10 +- src/composables/useRetrieveFlow.ts | 1 + src/composables/useSendFlow.ts | 1 + src/i18n/locales/en-US.ts | 13 +- src/i18n/locales/zh-CN.ts | 13 +- src/layout/AdminLayout/AdminLayout.vue | 44 +++- src/stores/alertStore.ts | 2 + src/utils/content-preview.ts | 7 +- src/utils/file-processing.ts | 3 +- src/views/RetrievewFileView.vue | 2 +- src/views/SendFileView.vue | 8 +- src/views/manage/DashboardView.vue | 31 +-- src/views/manage/FileManageView.vue | 166 ++++++++++++-- src/views/manage/LoginView.vue | 35 ++- src/views/manage/SystemSettingsView.vue | 54 +++-- 26 files changed, 488 insertions(+), 441 deletions(-) diff --git a/src/App.vue b/src/App.vue index 3eb1071..bf17389 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,7 +17,14 @@ const { diff --git a/src/components/common/StatCard.vue b/src/components/common/StatCard.vue index 8aacf85..e1bdb12 100644 --- a/src/components/common/StatCard.vue +++ b/src/components/common/StatCard.vue @@ -12,7 +12,7 @@

{{ title }}

-

+

{{ value }}

diff --git a/src/composables/useAdminLogin.ts b/src/composables/useAdminLogin.ts index ce6a219..8146e49 100644 --- a/src/composables/useAdminLogin.ts +++ b/src/composables/useAdminLogin.ts @@ -3,8 +3,10 @@ import { AuthService } from '@/services' import { useAdminStore } from '@/stores/adminStore' import { useAlertStore } from '@/stores/alertStore' import { getErrorMessage } from '@/utils/common' +import { useI18n } from 'vue-i18n' export function useAdminLogin() { + const { t } = useI18n() const alertStore = useAlertStore() const adminStore = useAdminStore() const password = ref('') @@ -12,12 +14,12 @@ export function useAdminLogin() { const validateForm = () => { if (!password.value) { - alertStore.showAlert('无效的密码', 'error') + alertStore.showAlert(t('manage.login.invalidPassword'), 'error') return false } if (password.value.length < 6) { - alertStore.showAlert('密码长度至少为6位', 'error') + alertStore.showAlert(t('manage.login.passwordTooShort'), 'error') return false } @@ -31,7 +33,7 @@ export function useAdminLogin() { try { const response = await AuthService.login(password.value) if (!response.detail?.token) { - alertStore.showAlert('登录失败:未获取到有效令牌', 'error') + alertStore.showAlert(t('manage.login.noValidToken'), 'error') return false } @@ -44,7 +46,7 @@ export function useAdminLogin() { }) return true } catch (error: unknown) { - alertStore.showAlert(getErrorMessage(error, '登录失败'), 'error') + alertStore.showAlert(getErrorMessage(error, t('manage.login.loginFailed')), 'error') return false } finally { isLoading.value = false diff --git a/src/composables/useRetrieveFlow.ts b/src/composables/useRetrieveFlow.ts index e287a84..8d1574a 100644 --- a/src/composables/useRetrieveFlow.ts +++ b/src/composables/useRetrieveFlow.ts @@ -174,6 +174,7 @@ export function useRetrieveFlow() { } const deleteRecord = (id: number) => { + if (!window.confirm(t('fileRecord.deleteRecordConfirm'))) return const index = records.value.findIndex((record) => record.id === id) if (index !== -1) { fileStore.deleteReceiveData(index) diff --git a/src/composables/useSendFlow.ts b/src/composables/useSendFlow.ts index 3f6a6b8..9440e9e 100644 --- a/src/composables/useSendFlow.ts +++ b/src/composables/useSendFlow.ts @@ -300,6 +300,7 @@ export function useSendFlow() { } const deleteRecord = (id: number) => { + if (!window.confirm(t('fileRecord.deleteRecordConfirm'))) return const index = fileDataStore.shareData.findIndex((record) => record.id === id) if (index !== -1) { fileDataStore.deleteShareData(index) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 80bb11c..38cca97 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -27,6 +27,7 @@ export default { info: 'Information', search: 'Search', copy: 'Copy', + more: 'More', uploadSuccess: 'Upload successful', uploadFailed: 'Upload failed', copySuccess: 'Copy successful', @@ -311,7 +312,7 @@ export default { }, submit: 'Secure Send', submitting: 'Sending...', - needRetrieveFile: 'Need to retrieve? Click here', + needRetrieveFile: 'Retrieve a file', sendRecords: 'Send Records', secureEncryption: 'Secure Encryption', workspace: { @@ -405,6 +406,7 @@ export default { download: 'Download', viewDetails: 'View Details', deleteRecord: 'Delete Record', + deleteRecordConfirm: 'Delete this local record? The file on the server will not be deleted.', preview: 'Preview', copyContent: 'Copy Content', contentCopied: 'Content copied to clipboard', @@ -510,6 +512,8 @@ export default { previewFallback: 'Preview endpoint unavailable; using text from the list', selectCurrentPage: 'Select current page', selectedCount: '{count} selected', + mobileBatchActions: 'Mobile batch actions', + policyActionsLabel: 'Policy', selectFile: 'Select {name}', clearSelection: 'Clear Selection', batchDelete: 'Batch Delete', @@ -774,11 +778,13 @@ export default { refreshConfig: 'Refresh Config', refreshing: 'Refreshing', saving: 'Saving', - unsavedChanges: 'Unsaved configuration changes', - allChangesSaved: 'All configuration changes are saved', + unsavedChanges: 'Unsaved changes', + allChangesSaved: 'Saved', refreshBlocked: 'Save current changes before refreshing' ,sectionNavigation: 'Settings section navigation' ,reloadSaved: 'Reload saved settings' + ,discardChanges: 'Discard changes' + ,discardChangesConfirm: 'Discard unsaved changes and reload the saved settings?' ,robotsWarning: 'A Disallow: / rule blocks search engines from crawling the entire site.' ,fileSizeUnit: 'File size unit' ,timeUnit: 'Time unit' @@ -965,6 +971,7 @@ export default { // Components components: { pagination: { + navigation: 'Pagination', range: 'Showing {start} to {end} of {total}', pageSize: 'Items per page', perPage: '{size}/page', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index f282d13..a2b135b 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -27,6 +27,7 @@ export default { info: '信息', search: '搜索', copy: '复制', + more: '更多', uploadSuccess: '上传成功', uploadFailed: '上传失败', copySuccess: '复制成功', @@ -311,7 +312,7 @@ export default { }, submit: '安全寄送', submitting: '发送中...', - needRetrieveFile: '需要取件?点击这里', + needRetrieveFile: '前往取件', sendRecords: '发件记录', secureEncryption: '安全加密', workspace: { @@ -508,6 +509,8 @@ export default { previewFallback: '预览接口不可用,已使用列表中的文本内容', selectCurrentPage: '选择当前页', selectedCount: '已选择 {count} 项', + mobileBatchActions: '移动端批量操作', + policyActionsLabel: '策略', selectFile: '选择 {name}', clearSelection: '清空选择', batchDelete: '批量删除', @@ -704,6 +707,7 @@ export default { download: '下载', viewDetails: '查看详情', deleteRecord: '删除记录', + deleteRecordConfirm: '确认删除这条本地记录?此操作不会删除服务器上的文件。', preview: '预览', copyContent: '复制内容', contentCopied: '内容已复制到剪贴板', @@ -802,11 +806,13 @@ export default { refreshConfig: '刷新配置', refreshing: '刷新中', saving: '保存中', - unsavedChanges: '有未保存的配置变更', - allChangesSaved: '所有配置已保存', + unsavedChanges: '有未保存修改', + allChangesSaved: '已保存', refreshBlocked: '请先保存当前变更再刷新' ,sectionNavigation: '设置分区导航' ,reloadSaved: '重新加载已保存配置' + ,discardChanges: '放弃修改' + ,discardChangesConfirm: '确认放弃当前未保存的修改并重新加载已保存配置?' ,robotsWarning: '如果包含 Disallow: /,搜索引擎将无法抓取整个站点。' ,fileSizeUnit: '文件大小单位' ,timeUnit: '时间单位' @@ -985,6 +991,7 @@ export default { // 组件相关 components: { pagination: { + navigation: '分页导航', range: '显示第 {start} 到 {end} 条,共 {total} 条', pageSize: '每页显示数量', perPage: '{size}/页', diff --git a/src/layout/AdminLayout/AdminLayout.vue b/src/layout/AdminLayout/AdminLayout.vue index a622b86..56b016e 100644 --- a/src/layout/AdminLayout/AdminLayout.vue +++ b/src/layout/AdminLayout/AdminLayout.vue @@ -3,8 +3,17 @@ class="flex h-screen overflow-hidden flex-col transition-colors duration-300 lg:flex-row" :class="[isDarkMode ? 'bg-[#10191e]' : 'bg-[#dfe9eb]']" > + @@ -93,7 +102,7 @@ :class="[isDarkMode ? 'bg-[#1a2930] border-[#31454d]' : 'bg-[#f2f6f5] border-[#c8d7da]']" >
-
@@ -111,7 +120,7 @@