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 @@