diff --git a/src/features/workbench/components/HomeEntryView.vue b/src/features/workbench/components/HomeEntryView.vue index e996629..bfb8f57 100644 --- a/src/features/workbench/components/HomeEntryView.vue +++ b/src/features/workbench/components/HomeEntryView.vue @@ -104,6 +104,20 @@ const projectIndustryLabel = computed(() => { if (!target) return '' return getIndustryDisplayName(target, locale.value) || '' }) +const heroBrandName = computed(() => t('home.cards.heroBrand')) +const heroBrandMessages = computed(() => [ + t('home.cards.heroBrandMessage1'), + t('home.cards.heroBrandMessage2'), + t('home.cards.heroBrandMessage3'), + t('home.cards.heroBrandMessage4'), + t('home.cards.heroBrandMessage5') +].filter(Boolean)) +const heroBrandMessageIndex = ref(0) +const activeHeroBrandMessage = computed(() => { + const options = heroBrandMessages.value + if (!options.length) return '' + return options[((heroBrandMessageIndex.value % options.length) + options.length) % options.length] +}) const localeBadge = computed(() => (locale.value === 'en-US' ? 'EN' : '中')) const toggleLocale = () => { const next = locale.value === 'en-US' ? 'zh-CN' : 'en-US' @@ -393,10 +407,29 @@ const handleHomeVisibilityChange = () => { handleHomeWindowFocus() } +let heroBrandMessageTimer: ReturnType | null = null + +const stopHeroBrandMessageRotation = () => { + if (heroBrandMessageTimer == null) return + clearInterval(heroBrandMessageTimer) + heroBrandMessageTimer = null +} + +const startHeroBrandMessageRotation = () => { + stopHeroBrandMessageRotation() + if (heroBrandMessages.value.length <= 1) return + heroBrandMessageTimer = setInterval(() => { + const total = heroBrandMessages.value.length + if (total <= 1) return + heroBrandMessageIndex.value = (heroBrandMessageIndex.value + 1) % total + }, 2400) +} + onMounted(() => { void refreshExistingProjects() void loadProjectDefaults() void loadQuickDefaults() + startHeroBrandMessageRotation() window.addEventListener('focus', handleHomeWindowFocus) document.addEventListener('visibilitychange', handleHomeVisibilityChange) try { @@ -421,6 +454,7 @@ onMounted(() => { onBeforeUnmount(() => { stopExistingProjectPolling() + stopHeroBrandMessageRotation() window.removeEventListener('focus', handleHomeWindowFocus) document.removeEventListener('visibilitychange', handleHomeVisibilityChange) }) @@ -467,6 +501,13 @@ onBeforeUnmount(() => {

{{ t('home.cards.heroTitle') }}

{{ t('home.cards.heroSubTitle') }}

+
+ {{ heroBrandName }} + + + {{ activeHeroBrandMessage }} + +

{{ t('home.cards.heroDesc') }}

@@ -582,6 +623,13 @@ onBeforeUnmount(() => { +
+
+ {{ t('home.cards.heroFooterTitle') }} + | + {{ t('home.cards.heroFooterSubTitle') }} +
+
@@ -738,6 +786,9 @@ onBeforeUnmount(() => { .home-entry-item { animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; } +.home-slogan-row { + animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both; +} .home-entry-item--1 { animation-delay: 0.2s; } .home-entry-item--2 { animation-delay: 0.3s; } .home-entry-item--3 { animation-delay: 0.4s; } @@ -819,4 +870,13 @@ onBeforeUnmount(() => { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } } +.hero-brand-message-enter-active, +.hero-brand-message-leave-active { + transition: opacity 0.22s ease, transform 0.22s ease; +} +.hero-brand-message-enter-from, +.hero-brand-message-leave-to { + opacity: 0; + transform: translateY(6px); +} diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 6c8e522..8a87dd4 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -26,6 +26,14 @@ export const enUS = { cards: { heroTitle: 'One-Click Smart Budget', heroSubTitle: 'Accelerate standards adoption', + heroFooterTitle: 'Instant Cost Intelligence', + heroFooterSubTitle: 'Leave your time for creation', + heroBrand: 'Huizhongyi', + heroBrandMessage1: 'So easy', + heroBrandMessage2: 'Fee calc made easy', + heroBrandMessage3: 'No late nights for fees', + heroBrandMessage4: 'No heavy lifting for fees', + heroBrandMessage5: 'No late nights, no heavy lifting', heroDesc: 'Cost consulting fee calculator for transport construction projects', projectBudget: 'Project Budget', projectBudgetDesc: 'For full project-level calculation across multiple contracts with import/export support', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index d008d85..7227222 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -26,6 +26,14 @@ export const zhCN = { cards: { heroTitle: '智能预算一键生成', heroSubTitle: '助力《规范》高效落地', + heroFooterTitle: '智算费用 即点即出', + heroFooterSubTitle: '您的时间留给创造', + heroBrand: '慧众易', + heroBrandMessage1: '真容易', + heroBrandMessage2: '算费真容易', + heroBrandMessage3: '算费不熬夜', + heroBrandMessage4: '算费不费力', + heroBrandMessage5: '不熬夜,不费力', heroDesc: '交通建设项目工程造价咨询服务费计算', projectBudget: '项目预算', projectBudgetDesc: '适用于多合同段、项目级整体计算,支持导出/导入完整项目数据',