From ef82fc805d8f047f3fb8a6e992060e0643c97e1b Mon Sep 17 00:00:00 2001 From: xiaomai Date: Sun, 3 May 2026 12:05:29 +0800 Subject: [PATCH] feat(automation): add coming soon page and navigation entry Add Automation route and navigation item with in-development badge Include localized wordings, icon, and design docs for the new section --- DESIGN.md | 3 ++- frontend/src/App.vue | 2 ++ frontend/src/icons.ts | 1 + frontend/src/router/index.ts | 1 + frontend/src/styles/main.css | 4 ++++ frontend/src/views/ComingSoonView.vue | 6 ++++-- system-wordings.ts | 24 ++++++++++++++++++++++++ 7 files changed, 38 insertions(+), 3 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 094bc37..79fe35e 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -5,7 +5,7 @@ - Pokopia Wiki 是一个面向 Pokopia 游戏资料的社区 Wiki。 - 所有人都可以浏览 Wiki 内容。 - 已注册并完成邮箱验证且拥有对应权限的用户可以创建、编辑、删除 Wiki 内容。 -- 前台以 Pokemon、栖息地、物品、材料单、每日 CheckList、Life、Dish、Events、Actions、Dream Island、Clothes 为主要浏览入口。 +- 前台以 Pokemon、栖息地、物品、材料单、每日 CheckList、Life、Automation、Dish、Events、Actions、Dream Island、Clothes 为主要浏览入口。 - 管理入口用于维护全局配置、语言、系统文案、列表排序和每日 CheckList。 ## 技术栈 @@ -606,6 +606,7 @@ API 暴露边界: 以下前台公开入口当前仅展示“正在开发中”占位页,不提供数据模型、后端 API、编辑表单、管理入口或排序能力: +- Automation:未来用于分享自动化基地(亦称工厂)创建方案、材料产出、所需 Pokemon、生产顺序和共同喜好物品。 - Dish - Events - Actions:游戏内快捷动作,例如挥手、跳舞等。 diff --git a/frontend/src/App.vue b/frontend/src/App.vue index f046c69..ebcf04a 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -6,6 +6,7 @@ import AppShell from './components/AppShell.vue'; import { iconAction, iconAdmin, + iconAutomation, iconChecklist, iconClothes, iconDish, @@ -45,6 +46,7 @@ const navItems = computed(() => { { label: t('nav.habitats'), to: '/habitats', icon: iconHabitat }, { label: t('nav.items'), to: '/items', icon: iconItem }, { label: t('nav.recipes'), to: '/recipes', icon: iconRecipe }, + { label: t('nav.automation'), to: '/automation', icon: iconAutomation, badge: inDevBadge() }, { label: t('nav.dish'), to: '/dish', icon: iconDish, badge: inDevBadge() }, { label: t('nav.events'), to: '/events', icon: iconEvent, badge: inDevBadge() }, { label: t('nav.actions'), to: '/actions', icon: iconAction, badge: inDevBadge() }, diff --git a/frontend/src/icons.ts b/frontend/src/icons.ts index 5d0cbde..79f8f6f 100644 --- a/frontend/src/icons.ts +++ b/frontend/src/icons.ts @@ -3,6 +3,7 @@ export type AppIcon = string; export const iconAdd: AppIcon = 'mdi:plus'; export const iconAdmin: AppIcon = 'mdi:tune-variant'; export const iconAction: AppIcon = 'mdi:gesture-tap-button'; +export const iconAutomation: AppIcon = 'mdi:factory'; export const iconBack: AppIcon = 'mdi:arrow-left'; export const iconCancel: AppIcon = 'mdi:close'; export const iconCheck: AppIcon = 'mdi:check'; diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 16ccbcf..10dd083 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -39,6 +39,7 @@ export const router = createRouter({ { path: '/recipes/new', name: 'recipe-new', component: RecipeList, meta: { requiredPermission: 'recipes.create', editorModal: true } }, { path: '/recipes/:id/edit', name: 'recipe-edit', component: RecipeDetail, meta: { requiredPermission: 'recipes.update', editorModal: true } }, { path: '/recipes/:id', name: 'recipe-detail', component: RecipeDetail }, + { path: '/automation', name: 'automation', component: ComingSoonView, props: { page: 'automation' } }, { path: '/dish', name: 'dish', component: ComingSoonView, props: { page: 'dish' } }, { path: '/events', name: 'events', component: ComingSoonView, props: { page: 'events' } }, { path: '/actions', name: 'actions', component: ComingSoonView, props: { page: 'actions' } }, diff --git a/frontend/src/styles/main.css b/frontend/src/styles/main.css index 8796f34..7f8ee1c 100644 --- a/frontend/src/styles/main.css +++ b/frontend/src/styles/main.css @@ -2439,6 +2439,10 @@ button:disabled, --soon-accent: var(--pokemon-yellow); } +.coming-soon-panel--automation { + --soon-accent: var(--type-steel); +} + .coming-soon-panel--events { --soon-accent: var(--pokemon-red); } diff --git a/frontend/src/views/ComingSoonView.vue b/frontend/src/views/ComingSoonView.vue index a6d5ec8..b16ae6e 100644 --- a/frontend/src/views/ComingSoonView.vue +++ b/frontend/src/views/ComingSoonView.vue @@ -6,6 +6,7 @@ import PageHeader from '../components/PageHeader.vue'; import StatusBadge from '../components/StatusBadge.vue'; import { iconAction, + iconAutomation, iconClothes, iconDish, iconDreamIsland, @@ -13,11 +14,11 @@ import { type AppIcon } from '../icons'; -type ComingSoonPage = 'dish' | 'events' | 'actions' | 'dreamIsland' | 'clothes'; +type ComingSoonPage = 'automation' | 'dish' | 'events' | 'actions' | 'dreamIsland' | 'clothes'; type ComingSoonConfig = { icon: AppIcon; - accent: 'dish' | 'events' | 'actions' | 'dream' | 'clothes'; + accent: 'automation' | 'dish' | 'events' | 'actions' | 'dream' | 'clothes'; previewKeys: Array<'one' | 'two' | 'three'>; }; @@ -28,6 +29,7 @@ const props = defineProps<{ const { t } = useI18n(); const pageConfigByPage: Record = { + automation: { icon: iconAutomation, accent: 'automation', previewKeys: ['one', 'two', 'three'] }, dish: { icon: iconDish, accent: 'dish', previewKeys: ['one', 'two', 'three'] }, events: { icon: iconEvent, accent: 'events', previewKeys: ['one', 'two', 'three'] }, actions: { icon: iconAction, accent: 'actions', previewKeys: ['one', 'two', 'three'] }, diff --git a/system-wordings.ts b/system-wordings.ts index 37a8982..c9ebcf8 100644 --- a/system-wordings.ts +++ b/system-wordings.ts @@ -46,6 +46,7 @@ export const systemWordingMessages = { habitats: 'Habitats', items: 'Items', recipes: 'Recipes', + automation: 'Automation', dish: 'Dish', events: 'Events', actions: 'Actions', @@ -301,6 +302,17 @@ export const systemWordingMessages = { heading: 'This wiki section is being prepared.', previewLabel: 'Section preview', sections: { + automation: { + kicker: 'Automation', + title: 'Automation', + subtitle: 'Factory and automation base guides will be shared here.', + body: 'Automation pages will help players compare production setups, material outputs, required Pokemon, production order, and shared favourites.', + preview: { + one: 'Factory guides will focus on the base layout and production goal.', + two: 'Material output, Pokemon needs, and production order will stay easy to scan.', + three: 'Shared favourite items can help players plan compatible teams and workflows.' + } + }, dish: { kicker: 'Dish', title: 'Dish', @@ -756,6 +768,7 @@ export const systemWordingMessages = { habitats: '栖息地', items: '物品', recipes: '材料单', + automation: '自动化', dish: '料理', events: '活动', actions: '动作', @@ -1011,6 +1024,17 @@ export const systemWordingMessages = { heading: '这个 Wiki 分区正在准备中。', previewLabel: '分区预览', sections: { + automation: { + kicker: 'Automation', + title: '自动化', + subtitle: '自动化基地和工厂方案会在这里分享。', + body: '自动化分区会帮助玩家对比生产配置、材料产出、所需 Pokemon、生产顺序和共同喜好物品。', + preview: { + one: '工厂方案会围绕基地布局和生产目标整理。', + two: '材料产出、Pokemon 需求和生产顺序会保持易读。', + three: '共同喜好物品可用于规划更适合协作的队伍和流程。' + } + }, dish: { kicker: 'Dish', title: '料理',