From 49a916bbf48a2c119f9a912ae550bea54d07b417 Mon Sep 17 00:00:00 2001 From: flym Date: Sat, 12 Sep 2026 03:00:43 +0800 Subject: [PATCH] feat: home menu link, button restyle with brand icon, CMS zh labels/i18n and logout button --- app/contact/page.tsx | 3 +- app/globals.css | 11 +-- app/not-found.tsx | 3 +- app/page.tsx | 5 +- app/products/[slug]/page.tsx | 3 +- app/tts/page.tsx | 7 +- apps/cms/payload.config.ts | 21 +++++- apps/cms/src/app/(payload)/admin/importMap.js | 2 + .../src/app/(payload)/api/cms-logout/route.ts | 66 +++++++++++++++++ apps/cms/src/collections/HomeContent.ts | 11 +-- apps/cms/src/collections/Media.ts | 6 +- apps/cms/src/collections/Products.ts | 43 +++++++---- apps/cms/src/collections/SiteSettings.ts | 11 +-- apps/cms/src/collections/Users.ts | 6 +- apps/cms/src/components/CmsLogoutButton.tsx | 72 +++++++++++++++++++ components/account-panel.tsx | 5 +- components/admin/gate.tsx | 3 +- components/admin/tts.tsx | 11 +-- components/admin/users.tsx | 27 +++---- components/auth-form.tsx | 5 +- components/brand-icon.tsx | 6 ++ components/site-header.tsx | 11 +-- lib/content.ts | 1 + 23 files changed, 271 insertions(+), 68 deletions(-) create mode 100644 apps/cms/src/app/(payload)/api/cms-logout/route.ts create mode 100644 apps/cms/src/components/CmsLogoutButton.tsx create mode 100644 components/brand-icon.tsx diff --git a/app/contact/page.tsx b/app/contact/page.tsx index 828143d..b70c717 100644 --- a/app/contact/page.tsx +++ b/app/contact/page.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; import { ArrowRight } from "@/components/icons"; +import { BrandIcon } from "@/components/brand-icon"; import { PreviewNotice, SectionHeading, StatusCard } from "@/components/ui"; export const metadata = { title: "联系我们" }; @@ -17,7 +18,7 @@ export default function ContactPage() {

需要查看当前项目能力?

可以先浏览产品结构或打开 AI Lab 的 TTS 工作台预览。

-
查看产品 查看 AI Lab
+
查看产品 查看 AI Lab
); diff --git a/app/globals.css b/app/globals.css index cc13bfe..6d74c2c 100644 --- a/app/globals.css +++ b/app/globals.css @@ -178,18 +178,19 @@ select:focus-visible { } .button-primary { - background: #ff6a00; - color: #0d0f12; + background: transparent; + color: #ff812b; } .button-primary:hover { - background: #ff812b; + background: #ff6a00; + color: #0d0f12; transform: translateY(-2px); } .button-secondary { border: 1px solid #1677ff; - background: rgba(22, 119, 255, 0.08); + background: transparent; color: #dbeafe; } @@ -200,10 +201,12 @@ select:focus-visible { .button-ghost { border: 1px solid #2a2f36; + background: transparent; color: #d1d5db; } .button-ghost:hover { + background: rgba(0, 209, 230, 0.1); border-color: #00d1e6; color: #f5f7fa; } diff --git a/app/not-found.tsx b/app/not-found.tsx index b737c78..0d72988 100644 --- a/app/not-found.tsx +++ b/app/not-found.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; +import { BrandIcon } from "@/components/brand-icon"; export default function NotFound() { - return

404 / Not found

这条路径还没有内容。

页面不存在,或内容仍在准备中。返回首页继续浏览。

返回首页
; + return

404 / Not found

这条路径还没有内容。

页面不存在,或内容仍在准备中。返回首页继续浏览。

返回首页
; } diff --git a/app/page.tsx b/app/page.tsx index 371fd7c..f406764 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; import { ArrowRight, BluetoothIcon, ChipIcon, SparkIcon, WaveIcon } from "@/components/icons"; +import { BrandIcon } from "@/components/brand-icon"; import { ArrowLink, DevPlaceholder, ProductVisual, SectionHeading } from "@/components/ui"; import { getProducts } from "@/lib/content"; @@ -24,7 +25,7 @@ export default async function HomePage() {

连接技术与日常。

我们专注于蓝牙周边、音频与智能设备,持续把可靠的技术变成简单、可用的产品。

- 了解产品 + 了解产品 探索技术
@@ -83,7 +84,7 @@ export default async function HomePage() {

AI Lab

让设备更懂声音。

从文本转语音开始,探索语音能力在真实产品中的应用。完整工具位于独立工作台,不抢占首页的产品叙事。

- 体验 TTS + 体验 TTS
diff --git a/app/products/[slug]/page.tsx b/app/products/[slug]/page.tsx index c3a8ef9..46440bf 100644 --- a/app/products/[slug]/page.tsx +++ b/app/products/[slug]/page.tsx @@ -1,5 +1,6 @@ import { notFound } from "next/navigation"; import { ArrowRight } from "@/components/icons"; +import { BrandIcon } from "@/components/brand-icon"; import { DevPlaceholder, FeatureList, PreviewNotice, ProductVisual } from "@/components/ui"; import { getProducts } from "@/lib/content"; @@ -29,7 +30,7 @@ export default async function ProductDetailPage({ params }: { params: Promise<{

{product.category}

{product.name}

{product.summary}

- +
diff --git a/app/tts/page.tsx b/app/tts/page.tsx index 0ef4ef2..77fa9e3 100644 --- a/app/tts/page.tsx +++ b/app/tts/page.tsx @@ -3,6 +3,7 @@ import Link from "next/link"; import { useEffect, useState } from "react"; import { ArrowRight, WaveIcon } from "@/components/icons"; +import { BrandIcon } from "@/components/brand-icon"; import { PreviewNotice, SectionHeading, StatusCard } from "@/components/ui"; const apiBase = process.env.NEXT_PUBLIC_API_BASE_URL ?? "/api/v1"; @@ -93,13 +94,13 @@ export default function TtsPage() { return
Phase 3
{loggedIn ? "当前使用测试数据库和真实任务 Worker。上游未配置时任务会明确失败并释放额度。" : "生成、历史、回放和下载需要登录。"}
- {!loggedIn ?
前往登录
: <> + {!loggedIn ?
前往登录
: <>
-

01 / Input

输入文本

{normalizeText(text).length} / 当前计划限制