From 6975525b70b80da111c8517796b0091a75eeecc1 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 19 Aug 2025 01:15:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=A2=84=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=89=88=E6=9C=AC=E6=8F=90=E9=86=92=E5=92=8C=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/i18n/locales/en-US/core/header.json | 6 +++ .../src/i18n/locales/zh-CN/core/header.json | 6 +++ .../full/vertical-header/VerticalHeader.vue | 44 ++++++++++++++++++- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/dashboard/src/i18n/locales/en-US/core/header.json b/dashboard/src/i18n/locales/en-US/core/header.json index 8cb203924..c7e354086 100644 --- a/dashboard/src/i18n/locales/en-US/core/header.json +++ b/dashboard/src/i18n/locales/en-US/core/header.json @@ -25,6 +25,12 @@ "dev": "🧐 Development (master branch)" }, "updateToLatest": "Update to Latest Version", + "preRelease": "Pre-release", + "preReleaseWarning": { + "title": "Pre-release Version Notice", + "description": "Versions marked as pre-release may contain unknown issues or bugs and are not recommended for production use. If you encounter any problems, please visit ", + "issueLink": "GitHub Issues" + }, "tip": "💡 TIP: Switching to an older version or a specific version will not re-download the dashboard files, which may cause some data display errors. You can find the corresponding dashboard files dist.zip at", "tipLink": "here", "tipContinue": ", extract and replace the data/dist folder. Of course, the frontend source code is in the dashboard directory, you can also build it yourself using npm install and npm build.", diff --git a/dashboard/src/i18n/locales/zh-CN/core/header.json b/dashboard/src/i18n/locales/zh-CN/core/header.json index a1d23a2ae..11331a419 100644 --- a/dashboard/src/i18n/locales/zh-CN/core/header.json +++ b/dashboard/src/i18n/locales/zh-CN/core/header.json @@ -25,6 +25,12 @@ "dev": "🧐 开发版(master 分支)" }, "updateToLatest": "更新到最新版本", + "preRelease": "预发布", + "preReleaseWarning": { + "title": "预发布版本提醒", + "description": "标有预发布标签的版本可能存在未知问题或 Bug,不建议在生产环境使用。如发现问题,请提交至 ", + "issueLink": "GitHub Issues" + }, "tip": "💡 TIP: 跳到旧版本或者切换到某个版本不会重新下载管理面板文件,这可能会造成部分数据显示错误。您可在", "tipLink": "此处", "tipContinue": "找到对应的面板文件 dist.zip,解压后替换 data/dist 文件夹即可。当然,前端源代码在 dashboard 目录下,你也可以自己使用 npm install 和 npm build 构建。", diff --git a/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue b/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue index 0a97c8742..c87678797 100644 --- a/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue +++ b/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue @@ -76,6 +76,13 @@ const open = (link: string) => { window.open(link, '_blank'); }; +// 检测是否为预发布版本 +const isPreRelease = (version: string) => { + const preReleaseKeywords = ['alpha', 'beta', 'rc', 'pre', 'preview', 'dev']; + const lowerVersion = version.toLowerCase(); + return preReleaseKeywords.some(keyword => lowerVersion.includes(keyword)); +}; + // 账户修改 function accountEdit() { accountEditStatus.value.loading = true; @@ -305,7 +312,7 @@ commonStore.getStartTime(); - +