From 3ef46b0aa8346319e91089b807f78be8390868f7 Mon Sep 17 00:00:00 2001 From: que01 Date: Wed, 14 Oct 2026 11:21:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E8=AF=AD=E8=A8=80=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 统一说明文案层级:Typography.Paragraph 次要文案迁移到 admin-section-description - 状态色补齐边框与中间调令牌,Alert/错误条/Descriptions 与 StatusTag 同源 - 咨询详情描述列表去表格线,改为键值展示并统一令牌 - 新增 BrandMark,侧栏与登录页标识改用品牌首字 - 信任内容改用列表行,空状态、表格骨架屏、主按钮脏检查落地 - design.md 同步令牌映射、切换控件选型与组件清单 --- apps/admin/design.md | 144 ++++++++-- apps/admin/src/components/BrandMark.tsx | 17 ++ apps/admin/src/components/EmptyState.tsx | 25 ++ apps/admin/src/components/QueryState.tsx | 6 +- .../src/components/RecordContentEditor.tsx | 2 +- apps/admin/src/components/TableSkeleton.tsx | 29 ++ .../src/components/TemplateListField.tsx | 10 +- .../features/brand/InquiryPreviewEditor.tsx | 8 +- .../src/features/brand/PresentationEditor.tsx | 32 +-- .../capabilities/CapabilitiesPage.tsx | 15 +- .../components/CapabilityCard.tsx | 27 +- .../src/features/inquiries/InquiriesPage.tsx | 257 ++++++++++-------- .../src/features/overview/OverviewPage.tsx | 6 +- .../features/publication/PublicationPage.tsx | 14 +- .../features/services/OfferingEditorModal.tsx | 12 +- .../src/features/services/OfferingsTable.tsx | 31 ++- apps/admin/src/features/team/MembersPage.tsx | 11 +- .../trust-content/TrustContentPage.tsx | 5 +- .../components/TrustContentEditorModal.tsx | 6 +- .../components/TrustContentList.tsx | 89 ++++++ .../components/TrustContentTable.tsx | 84 ------ .../src/features/workspace/WorkspacePage.tsx | 190 +++++++------ apps/admin/src/lib/theme.ts | 23 ++ apps/admin/src/main.tsx | 7 +- apps/admin/src/styles/admin.css | 179 +++++++++++- 25 files changed, 836 insertions(+), 393 deletions(-) create mode 100644 apps/admin/src/components/BrandMark.tsx create mode 100644 apps/admin/src/components/EmptyState.tsx create mode 100644 apps/admin/src/components/TableSkeleton.tsx create mode 100644 apps/admin/src/features/trust-content/components/TrustContentList.tsx delete mode 100644 apps/admin/src/features/trust-content/components/TrustContentTable.tsx diff --git a/apps/admin/design.md b/apps/admin/design.md index a4a73df..7c39dce 100644 --- a/apps/admin/design.md +++ b/apps/admin/design.md @@ -51,17 +51,22 @@ 强调色只用于:主按钮、选中态、链接、关键数字、聚焦描边。不得用于大面积背景。 +例外:小程序预览区(iframe / 模拟器内)显示的是模板自身的品牌色(例如餐饮模板的砖红 `#B54A2C`),与后台无关,不视为违规,也不要「修正」成后台强调色。 + ### 状态色 状态一律用「浅底 + 深字」,不使用 antd 的实心鲜艳 Tag。 -| 语义 | 底色 | 文字色 | -| ------------- | --------- | --------- | -| 成功 / 已发布 | `#ECFDF3` | `#067647` | -| 警告 / 进行中 | `#FFFAEB` | `#B54708` | -| 错误 / 失败 | `#FEF3F2` | `#B42318` | -| 中性 / 草稿 | `#F2F4F7` | `#475467` | -| 信息 / 系统态 | `#EFF4FF` | `#2563EB` | +| 语义 | 底色 | 边框 | 文字色 | +| ------------- | --------- | --------- | --------- | +| 成功 / 已发布 | `#ECFDF3` | `#ABEFC6` | `#067647` | +| 警告 / 进行中 | `#FFFAEB` | `#FEDF89` | `#B54708` | +| 错误 / 失败 | `#FEF3F2` | `#FBD5D1` | `#B42318` | +| 中性 / 草稿 | `#F2F4F7` | `#E7E9EC` | `#475467` | +| 信息 / 系统态 | `#EFF4FF` | `#B2CCFF` | `#2563EB` | + +- 底色 + 边框 + 深色文字三件套同时用于 `StatusTag`、`Alert`、错误条与空状态,不得混用其他色阶。 +- 需要中间调的场合(图标、进度条完成态)使用中间色:成功 `#12B76A`、警告 `#F79009`、错误 `#F04438`、信息 `#2563EB`。 --- @@ -196,11 +201,36 @@ 用于咨询详情、版本信息等只读信息:字段名 13px `#6B7280`,值 14px `#1C1F23`,行间距 12px,不使用表格线。 +落地:``,字号与间距由 `admin.css` 与 `Descriptions` 令牌统一,不逐处传 `bordered`。 + ### Tabs - 顶部 1px 分隔线,选中项底部 2px 强调色下划线 + 深色文字,未选中 14px `#6B7280`。 - 不超过 5 个 Tab,超出改用左侧分段导航。 +### 切换控件选型 + +同一层级切换控件只允许两种,按范围选择,不得混用: + +| 场景 | 控件 | 现状 | +| ---------------------------------------- | ----------- | ------------------------------ | +| 页面级分区(内容结构不同、各自独立成段) | `Tabs` | 配置与发布 | +| 区块内视图切换(同一份数据换视角) | `Segmented` | 小程序页面、业务提供项编辑弹窗 | + +`Segmented` 用作「取值选择」(如能力状态降级/启用/停用)时按表单控件处理,不受本表约束。 + +### 标题层级 + +页面内标题只用三档,禁止再用 `Typography.Title level` 直接指定字号: + +| 用途 | 类名 | 字号 | +| ---------------------- | --------------------- | ---------- | +| 区块标题 | `admin-section-title` | 16px / 600 | +| 面板内小标题、表单分组 | `admin-subhead` | 15px / 600 | +| 列表行、条目名称 | `admin-row-title` | 14px / 600 | + +页面级标题只由 `AdminPageHeader` 输出(24px / 600),一个页面只出现一次。 + ### 进度 - 高 6px,圆角 3px,轨道 `#F0F1F3`,进度条强调色;完成态用成功色。 @@ -223,25 +253,31 @@ - 提交成功后:关闭弹窗、重置表单、刷新受影响列表;提交失败保持原状。 - 幂等写操作要防止重复点击(提交中禁用)。 +落地约定: + +- 空状态统一用 `EmptyState`(`components/EmptyState.tsx`);表格内用 `compact` 变体,整块区域用默认变体。禁止再使用 antd 默认 `Empty` 插画。 +- 列表 / 表格加载统一用 `TableSkeleton`、`ListSkeleton`(`components/TableSkeleton.tsx`)替换内容区,不使用 antd `Table` 的转圈遮罩;卡片级加载用 `LoadingStack`。 +- 卡片内的写操作只在「有未保存修改」时使用主按钮,其余状态用次要按钮并禁用,同时用 `StatusTag` 标明修改状态。 + --- ## 7. 页面结构 以下为各页面的视觉结构约定,业务逻辑不变。 -| 页面 | 结构要点 | -| -------------- | ------------------------------------------------------------------------------ | -| 登录 | 居中 400px 卡片,标识 + 说明 + 表单 + 通栏主按钮;错误态展示在字段下方 | -| 首次改密 | 同登录卡片形态,说明文案 + 三个密码字段 + 「保存新密码」 | -| 品牌概览 | 品牌卡 + 三张指标卡(等宽一行)+ 两栏(发布准备度 / 品牌内容检查) | -| 配置与发布 | 三 Tab(内容发布 / 小程序发布 / 小程序配置);发布状态卡 + 草稿卡 + 历史版本表 | -| 小程序页面 | 左右两栏:左 380px 编辑面板,右预览画布;预览内选中区域虚线高亮 + 区域名气泡 | -| 信任内容 | 列表卡片(缩略图 + 标题 + 两行摘要 + 状态标签 + 行内操作),不用表格 | -| 业务提供项 | 表格(名称 / 价格 / 状态开关 / 排序 / 操作)+ 新增弹窗 | -| 咨询记录 | 顶部三指标 + 左 380px 列表 + 右详情的主从布局 | -| 模板与表单设置 | 行业模板网格(三列)+ 咨询表单字段编辑器 + 底部危险操作区 | -| 能力插件 | 插件卡片列表(图标 + 名称 + 说明 + 开关),停用态降低对比度 | -| 团队成员 | 表格(成员 / 角色 / 状态 / 最近登录 / 操作)+ 邀请弹窗 | +| 页面 | 结构要点 | +| -------------- | ------------------------------------------------------------------------------------- | +| 登录 | 居中 400px 卡片,标识 + 说明 + 表单 + 通栏主按钮;错误态展示在字段下方 | +| 首次改密 | 同登录卡片形态,说明文案 + 三个密码字段 + 「保存新密码」 | +| 品牌概览 | 品牌卡 + 三张指标卡(等宽一行)+ 两栏(发布准备度 / 品牌内容检查) | +| 配置与发布 | 三 Tab(内容发布 / 小程序发布 / 小程序配置);发布状态卡 + 草稿卡 + 历史版本表 | +| 小程序页面 | 左右两栏:左 380px 编辑面板,右预览画布;预览内选中区域虚线高亮 + 区域名气泡 | +| 信任内容 | 列表行(缩略图或类型图标 + 标题 + 类型/发布状态标签 + 两行摘要 + 行内操作),不用表格 | +| 业务提供项 | 表格(名称 / 价格 / 状态开关 / 排序 / 操作)+ 新增弹窗 | +| 咨询记录 | 顶部三指标 + 左 380px 列表 + 右详情的主从布局 | +| 模板与表单设置 | 行业模板网格(三列)+ 咨询表单字段编辑器 + 底部危险操作区 | +| 能力插件 | 插件卡片列表(图标 + 名称 + 说明 + 开关),停用态降低对比度 | +| 团队成员 | 表格(成员 / 角色 / 状态 / 最近登录 / 操作)+ 邀请弹窗 | 两栏页面在小屏下折叠为单列,编辑/预览改为上下排列。 @@ -280,17 +316,36 @@ const theme = { colorText: "#1C1F23", colorTextSecondary: "#6B7280", colorTextTertiary: "#9AA1AC", + colorTextQuaternary: "#C3C7CF", colorBgLayout: "#F7F8FA", colorBgContainer: "#FFFFFF", colorBorder: "#D8DBE0", colorBorderSecondary: "#E7E9EC", colorSplit: "#F0F1F3", + colorFillTertiary: "#F7F8FA", + colorFillQuaternary: "#FAFAFB", + colorSuccess: "#12B76A", + colorSuccessBg: "#ECFDF3", + colorSuccessBorder: "#ABEFC6", + colorSuccessText: "#067647", + colorWarning: "#F79009", + colorWarningBg: "#FFFAEB", + colorWarningBorder: "#FEDF89", + colorWarningText: "#B54708", + colorError: "#F04438", + colorErrorBg: "#FEF3F2", + colorErrorBorder: "#FBD5D1", + colorErrorText: "#B42318", + colorInfo: "#2563EB", + colorInfoBg: "#EFF4FF", + colorInfoBorder: "#B2CCFF", + colorInfoText: "#2563EB", borderRadius: 6, borderRadiusLG: 10, borderRadiusSM: 4, fontSize: 14, fontFamily: - "Inter, 'PingFang SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif", + "Inter, 'PingFang SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", controlHeight: 32, controlHeightLG: 40, boxShadow: "0 1px 2px rgba(16, 24, 40, 0.04)", @@ -298,30 +353,61 @@ const theme = { wireframe: false, }, components: { - Layout: { headerHeight: 56, siderBg: "#FFFFFF", bodyBg: "#F7F8FA" }, + Layout: { + headerHeight: 56, + headerBg: "#FFFFFF", + headerPadding: "0 24px", + siderBg: "#FFFFFF", + bodyBg: "#F7F8FA", + triggerBg: "#FFFFFF", + triggerColor: "#475467", + triggerHeight: 40, + }, Menu: { itemHeight: 36, itemBorderRadius: 6, + itemBg: "transparent", + itemColor: "#475467", + itemHoverBg: "#F7F8FA", + itemHoverColor: "#1C1F23", itemSelectedBg: "#EFF4FF", itemSelectedColor: "#2563EB", - itemHoverBg: "#F7F8FA", itemMarginInline: 8, itemMarginBlock: 2, + groupTitleColor: "#9AA1AC", groupTitleFontSize: 12, + collapsedWidth: 0, + subMenuItemBg: "transparent", }, - Card: { paddingLG: 20, headerFontSize: 16 }, + Card: { paddingLG: 20, headerFontSize: 16, headerHeight: 52, headerHeightSM: 44 }, Table: { headerBg: "#FAFAFB", headerColor: "#6B7280", rowHoverBg: "#FAFAFB", + headerSplitColor: "transparent", + borderColor: "#F0F1F3", cellPaddingBlock: 16, + headerBorderRadius: 8, + }, + Button: { fontWeight: 500, primaryShadow: "none", defaultShadow: "none" }, + Progress: { defaultColor: "#2563EB", remainingColor: "#F0F1F3", lineBorderRadius: 3 }, + Tag: { defaultBg: "#F2F4F7", defaultColor: "#475467", borderRadiusSM: 6 }, + Tabs: { inkBarColor: "#2563EB", itemSelectedColor: "#1C1F23", itemColor: "#6B7280" }, + Form: { labelColor: "#475467", labelFontSize: 13, verticalLabelPadding: "0 0 6px" }, + Modal: { borderRadiusLG: 12 }, + Statistic: { titleFontSize: 12, contentFontSize: 28 }, + Alert: { borderRadius: 8 }, + Descriptions: { + labelBg: "#FAFAFB", + labelColor: "#6B7280", + contentColor: "#1C1F23", + itemPaddingBottom: 12, }, - Button: { primaryShadow: "none", defaultShadow: "none", fontWeight: 500 }, - Progress: { defaultColor: "#2563EB", lineBorderRadius: 3 }, - Tag: { defaultBg: "#F2F4F7", defaultColor: "#475467" }, }, }; ``` -- 新增页面优先使用令牌与共享组件,禁止在 JSX 内写内联色值(现有顶栏/侧栏的内联样式需迁移)。 -- 共享视觉组件清单:`AdminPageHeader`、`QueryState`,以及后续新增的状态标签、空状态、卡片区块、指标卡。 +可执行来源是 `apps/admin/src/lib/theme.ts`,本块为同值快照;改令牌时两处一起改。 + +- 新增页面优先使用令牌与共享组件;禁止在 JSX 内写内联色值、字号、圆角(唯一的例外是通过 CSS 变量透传的数据色,例如视觉模板色板的 `--swatch-color`)。 +- 共享视觉组件清单:`AdminPageHeader`、`AdminSection`、`StatusTag`、`EmptyState`、`TableSkeleton` / `ListSkeleton`、`MetricCard`、`QueryState`。 diff --git a/apps/admin/src/components/BrandMark.tsx b/apps/admin/src/components/BrandMark.tsx new file mode 100644 index 0000000..663e200 --- /dev/null +++ b/apps/admin/src/components/BrandMark.tsx @@ -0,0 +1,17 @@ +/** + * 品牌标识:取品牌名首字渲染单字标记,未取到品牌时回落到中性字。 + * 视觉规则见 apps/admin/design.md 的「侧栏导航」。 + */ +export function BrandMark({ + name, + fallback = "品", + className = "admin-sider-brand-mark", +}: { + name?: string | null | undefined; + fallback?: string; + className?: string; +}) { + const trimmed = name?.trim() ?? ""; + const mark = Array.from(trimmed)[0] ?? fallback; + return {mark}; +} diff --git a/apps/admin/src/components/EmptyState.tsx b/apps/admin/src/components/EmptyState.tsx new file mode 100644 index 0000000..75b53e5 --- /dev/null +++ b/apps/admin/src/components/EmptyState.tsx @@ -0,0 +1,25 @@ +import type { ReactNode } from "react"; + +export function EmptyState({ + icon, + title, + description, + action, + compact = false, +}: { + icon?: ReactNode; + title: string; + description?: string; + action?: ReactNode; + compact?: boolean; +}) { + const className = compact ? "admin-empty admin-empty--compact" : "admin-empty"; + return ( +
+ {icon ? {icon} : null} +

{title}

+ {description ?

{description}

: null} + {action ?
{action}
: null} +
+ ); +} diff --git a/apps/admin/src/components/QueryState.tsx b/apps/admin/src/components/QueryState.tsx index c44381e..9c785da 100644 --- a/apps/admin/src/components/QueryState.tsx +++ b/apps/admin/src/components/QueryState.tsx @@ -1,4 +1,4 @@ -import { Button, Card, Empty, Skeleton } from "antd"; +import { Button, Card, Skeleton } from "antd"; import type { ReactNode } from "react"; function errorMessage(error: unknown, fallback: string) { @@ -59,7 +59,3 @@ export function ErrorNote({ export function MutationError({ error }: { error?: unknown }) { return ; } - -export function EmptyState({ description }: { description: string }) { - return ; -} diff --git a/apps/admin/src/components/RecordContentEditor.tsx b/apps/admin/src/components/RecordContentEditor.tsx index d3f41e3..84bf63d 100644 --- a/apps/admin/src/components/RecordContentEditor.tsx +++ b/apps/admin/src/components/RecordContentEditor.tsx @@ -88,7 +88,7 @@ export function RecordContentEditor({ } /> {save.isPending ? 正在保存内容… : null} - {section.description} +

{section.description}

diff --git a/apps/admin/src/components/TableSkeleton.tsx b/apps/admin/src/components/TableSkeleton.tsx new file mode 100644 index 0000000..8fb03f3 --- /dev/null +++ b/apps/admin/src/components/TableSkeleton.tsx @@ -0,0 +1,29 @@ +import { Skeleton } from "antd"; + +export function TableSkeleton({ rows = 4 }: { rows?: number }) { + return ( +
+ {Array.from({ length: rows }).map((_, index) => ( +
+ +
+ ))} +
+ ); +} + +export function ListSkeleton({ rows = 3 }: { rows?: number }) { + return ( +
+ {Array.from({ length: rows }).map((_, index) => ( +
+ +
+ + +
+
+ ))} +
+ ); +} diff --git a/apps/admin/src/components/TemplateListField.tsx b/apps/admin/src/components/TemplateListField.tsx index f45f619..e7fd2fe 100644 --- a/apps/admin/src/components/TemplateListField.tsx +++ b/apps/admin/src/components/TemplateListField.tsx @@ -1,4 +1,4 @@ -import { Button, Card, Collapse, Empty, Form, Input, Space, Typography } from "antd"; +import { Button, Card, Collapse, Form, Input, Space, Typography } from "antd"; import { CaretDownOutlined, CaretUpOutlined, @@ -6,6 +6,7 @@ import { PlusOutlined, } from "@ant-design/icons"; import type { TemplateAdminField } from "@personal-brand/api-client"; +import { EmptyState } from "./EmptyState.js"; export function TemplateListField({ field, @@ -29,12 +30,7 @@ export function TemplateListField({ > {(rows, { add, remove, move }, { errors }) => (
- {rows.length === 0 ? ( - - ) : null} + {rows.length === 0 ? : null} {rows.map((row, index) => { const titleField = field.itemFields?.[0]; const primaryTitle = titleField ? ( diff --git a/apps/admin/src/features/brand/InquiryPreviewEditor.tsx b/apps/admin/src/features/brand/InquiryPreviewEditor.tsx index 14f052a..844fe86 100644 --- a/apps/admin/src/features/brand/InquiryPreviewEditor.tsx +++ b/apps/admin/src/features/brand/InquiryPreviewEditor.tsx @@ -1,4 +1,4 @@ -import { Alert, Button, Form, Input, Select, Space, Switch, Typography, message } from "antd"; +import { Alert, Button, Form, Input, Select, Space, Switch, message } from "antd"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useEffect } from "react"; import type { RuntimeWorkspace } from "@personal-brand/api-client"; @@ -79,9 +79,9 @@ export function InquiryPreviewEditor({ onValuesChange={(_, values) => onDraft(update(values))} onFinish={(values) => save.mutate(values)} > - +

{record.name} · 编辑字段:{field.label} - +

{(fields, { add, remove }) => (
- {fields.length ? 选项 : null} + {fields.length ?

选项

: null} {fields.map(({ key, name }) => ( diff --git a/apps/admin/src/features/brand/PresentationEditor.tsx b/apps/admin/src/features/brand/PresentationEditor.tsx index 27ac4ad..8ba6e95 100644 --- a/apps/admin/src/features/brand/PresentationEditor.tsx +++ b/apps/admin/src/features/brand/PresentationEditor.tsx @@ -538,7 +538,7 @@ export function PresentationEditor({
- 页面预览 +

页面预览

{selectedPage === "detail" && draftWorkspace?.offerings.length ? ( update.mutate({ id: item.id, value: value as never })} - options={statuses.map((value) => ({ value, label: labels[value] }))} - /> - - - ), - }, - ]} - /> + ), + }, + { title: "联系人", dataIndex: "customerName" }, + { + title: "提交时间", + dataIndex: "createdAt", + render: (value: string) => new Date(value).toLocaleString("zh-CN"), + }, + { + title: "状态", + dataIndex: "status", + render: (value: string) => ( + + ), + }, + { + title: "操作", + render: (_: unknown, item: AdminBooking) => ( + + ({ - value, - label: inquiryLabels[value], - }))} - onChange={(value) => updateSubmission.mutate({ id: item.id, status: value })} + { + title: "状态", + dataIndex: "status", + render: (value: InquirySubmission["status"]) => ( + - - updateSubmission.mutate({ - id: item.id, - status: item.status, - adminNote: event.currentTarget.value, - }) - } - /> - - ), - }, - ]} - /> + ), + }, + { title: "版本", dataIndex: "formVersion", render: (value) => `v${value}` }, + { + title: "提交时间", + dataIndex: "createdAt", + render: (value: string) => new Date(value).toLocaleString("zh-CN"), + }, + { + title: "内容", + dataIndex: "values", + render: (value: Record) => { + const entries = Object.entries(value ?? {}); + return entries.length + ? entries.map(([key, item]) => `${key}: ${String(item)}`).join(";") + : "暂无内容"; + }, + }, + { + title: "跟进", + render: (_: unknown, item: InquirySubmission) => ( + + + + updateSubmission.mutate({ + id: item.id, + status: item.status, + adminNote: event.currentTarget.value, + }) + } + /> + + ), + }, + ]} + /> + )} {selectedSubmission && ( - + {selectedSubmission.inquiryForm?.name || "品牌咨询"} diff --git a/apps/admin/src/features/overview/OverviewPage.tsx b/apps/admin/src/features/overview/OverviewPage.tsx index 6f31946..a6b8576 100644 --- a/apps/admin/src/features/overview/OverviewPage.tsx +++ b/apps/admin/src/features/overview/OverviewPage.tsx @@ -1,4 +1,4 @@ -import { Button, Card, Col, Progress, Row, Typography } from "antd"; +import { Button, Card, Col, Progress, Row } from "antd"; import { useQueries, useQuery } from "@tanstack/react-query"; import { useNavigate } from "react-router-dom"; import { createApiClient } from "../../lib/api.js"; @@ -126,11 +126,11 @@ export function OverviewPage() { percent={completionPercent} status={readiness.data?.ready ? "success" : "active"} /> - +

{readiness.data?.ready ? "当前草稿已满足发布条件,可以进入发布页上线。" : `还有 ${incompleteChecks.length} 项需要完善,完成后才能发布。`} - +

{incompleteChecks.length > 0 && (
    {incompleteChecks.slice(0, 4).map((item) => ( diff --git a/apps/admin/src/features/publication/PublicationPage.tsx b/apps/admin/src/features/publication/PublicationPage.tsx index 0dfbf98..16fc30d 100644 --- a/apps/admin/src/features/publication/PublicationPage.tsx +++ b/apps/admin/src/features/publication/PublicationPage.tsx @@ -5,7 +5,6 @@ import { Alert, Button, Divider, - Empty, Input, Modal, Form, @@ -20,6 +19,7 @@ import type { BrandTemplateKey } from "@personal-brand/api-client"; import { createApiClient } from "../../lib/api.js"; import { AdminPageHeader } from "../../components/AdminPageHeader.js"; import { AdminSection } from "../../components/AdminSection.js"; +import { EmptyState } from "../../components/EmptyState.js"; import { ErrorNote, MutationError, QueryState } from "../../components/QueryState.js"; import { StatusTag, statusLabel } from "../../components/StatusTag.js"; import { MiniAppReleaseCard } from "./MiniAppReleaseCard.js"; @@ -581,7 +581,11 @@ export function PublicationPage({ canManageTemplate }: { canManageTemplate: bool ))}
) : ( - + )} @@ -623,7 +627,11 @@ export function PublicationPage({ canManageTemplate }: { canManageTemplate: bool ))}
) : ( - + )}
diff --git a/apps/admin/src/features/services/OfferingEditorModal.tsx b/apps/admin/src/features/services/OfferingEditorModal.tsx index e0a5d17..cbd51ef 100644 --- a/apps/admin/src/features/services/OfferingEditorModal.tsx +++ b/apps/admin/src/features/services/OfferingEditorModal.tsx @@ -1,4 +1,4 @@ -import { Alert, Button, Form, Input, Modal, Segmented, Select, Typography } from "antd"; +import { Alert, Button, Form, Input, Modal, Segmented, Select } from "antd"; import type { Offering, RuntimeWorkspace, @@ -103,7 +103,7 @@ export function OfferingEditorModal({ onFinish={onFinish} >
- 基础信息 +

基础信息

} > - , - }, - { - title: "字段数", - dataIndex: "fieldsSnapshot", - render: (value: unknown[]) => value?.length ?? 0, - }, - { - title: "状态", - dataIndex: "isEnabled", - render: (value: boolean) => ( - + {forms.isLoading && !forms.data ? ( + + ) : ( +
), - }, - { - title: "操作", - render: (_: unknown, item: InquiryForm) => ( - - - + updateForm.mutate({ id: item.id, body: { isEnabled } }) + } + /> + + ), + }, + ]} + /> + )} @@ -507,6 +520,15 @@ export function WorkspacePage() {
item.source === "custom")} + locale={{ + emptyText: ( + + ), + }} columns={[ { title: "字段", dataIndex: "label" }, { @@ -614,9 +636,9 @@ export function WorkspacePage() { confirmLoading={createForm.isPending || updateForm.isPending} width={760} > - +

先确定客户要提交的事情,再设置你希望客户填写的问题。保存后还需要在“配置与发布”中检查并发布,才会在小程序生效。 - +

- 品 + 个人品牌后台

管理你的品牌表达、内容发布与客户咨询。

@@ -158,7 +159,7 @@ function ChangePassword({ onComplete }: { onComplete: () => void }) {
- 品 + 首次登录需要修改密码

请先设置只有你本人知道的新密码。

@@ -237,7 +238,7 @@ function Dashboard({ onLogout, role }: { onLogout: () => void; role: string }) {
- 品 + 品牌工作区