From 6758aaaa7e42857863cff257c63a3739d68c767f Mon Sep 17 00:00:00 2001 From: xiaomai Date: Sun, 3 May 2026 17:46:36 +0800 Subject: [PATCH] feat(home): add home page as main entry point Introduce HomeView with quick links to wiki sections and community features Update navigation, routing, and logo links to point to the new home page --- DESIGN.md | 3 +- frontend/src/App.vue | 4 +- frontend/src/components/AppShell.vue | 4 +- frontend/src/icons.ts | 1 + frontend/src/router/index.ts | 3 +- frontend/src/seo.ts | 2 +- frontend/src/styles/main.css | 372 +++++++++++++++++++++++++++ frontend/src/views/HomeView.vue | 168 ++++++++++++ system-wordings.ts | 142 ++++++++++ 9 files changed, 693 insertions(+), 6 deletions(-) create mode 100644 frontend/src/views/HomeView.vue diff --git a/DESIGN.md b/DESIGN.md index 46800dc..f56fed2 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -5,7 +5,8 @@ - Pokopia Wiki 是一个面向 Pokopia 游戏资料的社区 Wiki。 - 所有人都可以浏览 Wiki 内容。 - 已注册并完成邮箱验证且拥有对应权限的用户可以创建、编辑、删除 Wiki 内容。 -- 前台以 Pokemon、栖息地、物品、材料单、每日 CheckList、Life、Automation、Dish、Events、Actions、Dream Island、Clothes 为主要浏览入口。 +- 前台以 Home 首页、Pokemon、栖息地、物品、材料单、每日 CheckList、Life、Automation、Dish、Events、Actions、Dream Island、Clothes 为主要浏览入口。 +- Home 首页路径为 `/`,用于聚合公开 Wiki 入口;Logo 导航回到 Home,用户可从 Home 进入核心资料、每日 CheckList、Life 和正在准备中的分区。 - 管理入口用于维护全局配置、语言、系统文案、列表排序和每日 CheckList。 ## 技术栈 diff --git a/frontend/src/App.vue b/frontend/src/App.vue index ebcf04a..461d896 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -13,6 +13,7 @@ import { iconDreamIsland, iconEvent, iconHabitat, + iconHome, iconItem, iconLife, iconPokemon, @@ -42,6 +43,7 @@ function can(permissionKey: string) { const navItems = computed(() => { const items = [ + { label: t('nav.home'), to: '/', icon: iconHome }, { label: t('nav.pokemon'), to: '/pokemon', icon: iconPokemon }, { label: t('nav.habitats'), to: '/habitats', icon: iconHabitat }, { label: t('nav.items'), to: '/items', icon: iconItem }, @@ -87,7 +89,7 @@ async function logout() { currentUser.value = null; setAuthToken(null); - await router.push('/pokemon'); + await router.push('/'); } async function loadLanguages() { diff --git a/frontend/src/components/AppShell.vue b/frontend/src/components/AppShell.vue index e572fe5..2f0ea20 100644 --- a/frontend/src/components/AppShell.vue +++ b/frontend/src/components/AppShell.vue @@ -110,7 +110,7 @@ onBeforeUnmount(() => {