From a247dd163d9741f1550f0b89bea278fffbad3534 Mon Sep 17 00:00:00 2001 From: Lan Date: Sat, 23 Nov 2024 21:50:46 +0800 Subject: [PATCH] update --- .env.production | 2 +- src/router/index.ts | 4 +- src/utils/api.ts | 2 +- src/views/RetrievewFileView.vue | 34 ++-- src/views/SendFileView.vue | 2 +- src/views/manage/FileManageView.vue | 256 +++++++++++++----------- src/views/manage/SystemSettingsView.vue | 6 +- 7 files changed, 166 insertions(+), 140 deletions(-) diff --git a/.env.production b/.env.production index 9b1c4f6..c9be971 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -VITE_API_BASE_URL_PROD=https://share.lanol.cn \ No newline at end of file +VITE_API_BASE_URL_PROD= \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 57f9108..ebc8693 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,7 +1,7 @@ -import { createRouter, createWebHistory } from 'vue-router' +import { createRouter, createWebHashHistory } from 'vue-router' const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), + history: createWebHashHistory(import.meta.env.BASE_URL), routes: [ { path: '/', diff --git a/src/utils/api.ts b/src/utils/api.ts index 85c879c..5aa6f78 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -51,7 +51,7 @@ api.interceptors.response.use( case 401: console.error('未授权,请重新登录') localStorage.clear() - window.location.href = '/login' + window.location.href = '/#/login' break case 403: // 禁止访问 diff --git a/src/views/RetrievewFileView.vue b/src/views/RetrievewFileView.vue index 9a7f944..dbb42f5 100644 --- a/src/views/RetrievewFileView.vue +++ b/src/views/RetrievewFileView.vue @@ -45,10 +45,11 @@ id="code" v-model="code" type="text" - class="w-full px-4 py-3 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10" + class="w-full px-4 py-3 rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10" :class="[ isDarkMode ? 'bg-gray-700 bg-opacity-50' : 'bg-gray-100', - { 'ring-2 ring-red-500': error } + { 'ring-2 ring-red-500': error }, + isDarkMode ? 'text-gray-300' : 'text-gray-800' ]" placeholder="请输入5位取件码" required @@ -592,19 +593,26 @@ const showContentPreview = () => { /* 添加 Markdown 样式 */ :deep(.prose) { - @apply text-left; + text-align: left; } -:deep(.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6) { - @apply text-indigo-600 dark:text-indigo-400; +:deep(.prose h1), +:deep(.prose h2), +:deep(.prose h3), +:deep(.prose h4), +:deep(.prose h5), +:deep(.prose h6) { + color: rgb(79, 70, 229); /* text-indigo-600 */ } -:deep(.prose a) { - @apply text-blue-600 dark:text-blue-400; -} -:deep(.prose code) { - @apply bg-gray-100 dark:bg-gray-700 rounded px-1; -} -:deep(.prose pre) { - @apply bg-gray-100 dark:bg-gray-700 rounded p-4 overflow-x-auto; + +@media (prefers-color-scheme: dark) { + :deep(.prose h1), + :deep(.prose h2), + :deep(.prose h3), + :deep(.prose h4), + :deep(.prose h5), + :deep(.prose h6) { + color: rgb(129, 140, 248); /* text-indigo-400 */ + } } /* 添加新的宽度类 */ diff --git a/src/views/SendFileView.vue b/src/views/SendFileView.vue index f543119..c6faf1b 100644 --- a/src/views/SendFileView.vue +++ b/src/views/SendFileView.vue @@ -424,7 +424,7 @@ const selectedFile = ref(null) const textContent = ref('') const fileInput = ref(null) const expirationMethod = ref('day') -const expirationValue = ref('') +const expirationValue = ref('1') const uploadProgress = ref(0) const showDrawer = ref(false) const selectedRecord = ref(null) diff --git a/src/views/manage/FileManageView.vue b/src/views/manage/FileManageView.vue index a118031..f526a8d 100644 --- a/src/views/manage/FileManageView.vue +++ b/src/views/manage/FileManageView.vue @@ -11,7 +11,7 @@
- - - +
-
- -
- -

拖拽文件到此处上传

-
-
- + + +
+ + {{ file.code }} + +
+
- {{ file.name }} + {{ file.prefix }}
- {{ file.size }} + {{ Math.round((file.size / 1024 / 1024) * 100) / 100 }}MB - {{ file.type }} + {{ file.text }} - {{ file.lastModified }} + {{ file.expired_at ? formatTimestamp(file.expired_at) : '永久' }} - + -->