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()