From 6889fdee1f80ed9c23c9b85cf9a8ccf819e4b622 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Mon, 27 Apr 2026 17:59:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20=E6=A0=87=E9=A2=98=E6=96=87?= =?UTF-8?q?=E6=A1=88=E4=B8=8E=E6=A0=B7=E5=BC=8F=E7=84=95=E6=96=B0=E3=80=8C?= =?UTF-8?q?=E6=98=9F=E8=80=80=E6=97=B6=E5=88=BB=EF=BC=8C=E8=87=B4=E6=95=AC?= =?UTF-8?q?=E5=A5=8B=E6=96=97=E8=80=85=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 中英文默认标题更新为「星耀时刻,致敬奋斗者」/「Stellar Moments · Tribute to the Driven」 - 在 main.ts 添加一次性迁移,自动覆盖本地缓存中的旧标题 - HeaderTitle 与 PrizeDraw 标题改用羚牛 logo 配色:深炭黑 + 翡翠绿 + 金色高光的渐变与流光动画 - 标题左右增加渐变细线 + 金/绿光点装饰,按钮统一为绿金品牌色 - 标题强制单行不换行,避免窄容器下折行 Co-Authored-By: Claude Opus 4.7 (1M context) --- src/locales/modules/data.ts | 4 +- src/main.ts | 16 ++ .../Home/components/HeaderTitle/index.vue | 145 ++++++++++++++++-- src/views/PrizeDraw/index.vue | 141 +++++++++++++++-- 4 files changed, 282 insertions(+), 24 deletions(-) diff --git a/src/locales/modules/data.ts b/src/locales/modules/data.ts index ef570d1..7025ea8 100644 --- a/src/locales/modules/data.ts +++ b/src/locales/modules/data.ts @@ -12,7 +12,7 @@ export const dataEn = { operation: 'Operation', delete: 'Delete', removePerson: 'Remove the Person', - defaultTitle: 'The Prelude to the Six Ministries of the Ming Dynasty Cabinet', + defaultTitle: 'Stellar Moments · Tribute to the Driven', xlsxName: 'personListTemplate-en.xlsx', readmeName: 'readme-en.md', } @@ -31,7 +31,7 @@ export const dataZhCn = { operation: '操作', delete: '删除', removePerson: '移入未中奖名单', - defaultTitle: '「氢」春正好,牛人闪耀', + defaultTitle: '星耀时刻,致敬奋斗者', xlsxName: '人口登记表-zhCn.xlsx', readmeName: 'readme-zhCn.md', } diff --git a/src/main.ts b/src/main.ts index dacbebf..152dfac 100644 --- a/src/main.ts +++ b/src/main.ts @@ -38,6 +38,22 @@ import 'virtual:svg-icons-register' // 更新CSS变量 document.documentElement.style.setProperty('--app-font-family', `"${globalConfig.theme.font}", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`) } + + // 一次性迁移旧的默认标题,确保已有用户也能看到新文案 + const legacyTitles = new Set([ + '「氢」春正好,牛人闪耀', + 'The Prelude to the Six Ministries of the Ming Dynasty Cabinet', + ]) + if (globalConfig.topTitle && legacyTitles.has(globalConfig.topTitle)) { + const isEn = globalConfig.language === 'en' + globalConfig.topTitle = isEn + ? 'Stellar Moments · Tribute to the Driven' + : '星耀时刻,致敬奋斗者' + if (storageData.globalConfig) { + storageData.globalConfig = globalConfig + } + localStorage.setItem('globalConfig', JSON.stringify(storageData.globalConfig ? storageData : globalConfig)) + } } } catch (e) { diff --git a/src/views/Home/components/HeaderTitle/index.vue b/src/views/Home/components/HeaderTitle/index.vue index faf2409..09ed3d2 100644 --- a/src/views/Home/components/HeaderTitle/index.vue +++ b/src/views/Home/components/HeaderTitle/index.vue @@ -40,22 +40,26 @@ const { t } = useI18n()