docs(copy): 全局状态标签、导航说明与账户菜单文案按 human-copy 重写
- 状态统一写「排队中」;「待审批」改「等你批准」,「其它」改「其他」 - 整理结果原因用「已整理 / 部分整理」;去掉引擎旧状态的「(旧)」 - 导航说明去掉「偏好标签」「留痕」等旧称与重复 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
542f107566
commit
8918fc268e
5 files changed
+19
-19
No files matched your search
@@ -40,7 +40,7 @@ function ChangePasswordDialog({ open, onOpenChange }: { open: boolean; onOpenCha
|
|||||||
setErrors({});
|
setErrors({});
|
||||||
try {
|
try {
|
||||||
const r = await change.mutateAsync({ currentPassword: form.currentPassword, newPassword: form.newPassword });
|
const r = await change.mutateAsync({ currentPassword: form.currentPassword, newPassword: form.newPassword });
|
||||||
toast.success(r.revokedSessions ? `密码已修改,已注销其它 ${r.revokedSessions} 个会话` : "密码已修改");
|
toast.success(r.revokedSessions ? `密码已修改,其他 ${r.revokedSessions} 个会话已退出` : "密码已修改");
|
||||||
setForm({ currentPassword: "", newPassword: "", confirm: "" });
|
setForm({ currentPassword: "", newPassword: "", confirm: "" });
|
||||||
onOpenChange(false);
|
onOpenChange(false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -58,7 +58,7 @@ function ChangePasswordDialog({ open, onOpenChange }: { open: boolean; onOpenCha
|
|||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>修改密码</DialogTitle>
|
<DialogTitle>修改密码</DialogTitle>
|
||||||
<DialogDescription>修改后其它设备上的会话会被注销,当前会话保留。</DialogDescription>
|
<DialogDescription>其他设备上的会话会退出登录,当前会话保留。</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<form id="pwd-form" onSubmit={submit} className="grid gap-1" noValidate>
|
<form id="pwd-form" onSubmit={submit} className="grid gap-1" noValidate>
|
||||||
<FormField label="当前密码" htmlFor="pwd-cur" error={errors.currentPassword}>
|
<FormField label="当前密码" htmlFor="pwd-cur" error={errors.currentPassword}>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const NAV_GROUPS: NavGroup[] = [
|
|||||||
to: "/console",
|
to: "/console",
|
||||||
label: "首页",
|
label: "首页",
|
||||||
icon: House,
|
icon: House,
|
||||||
description: "在忙什么、要我处理什么、最近整理了什么",
|
description: "进行中的任务、等你批准的操作、最近的整理",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "/console/agent",
|
to: "/console/agent",
|
||||||
@@ -68,11 +68,11 @@ export const NAV_GROUPS: NavGroup[] = [
|
|||||||
to: "/console/sites",
|
to: "/console/sites",
|
||||||
label: "站点",
|
label: "站点",
|
||||||
icon: Globe,
|
icon: Globe,
|
||||||
description: "PT 站、公开 BT 站与 RSS 源:账号、资源与 RSS",
|
description: "PT 站、公开 BT 站和自定义 RSS 源",
|
||||||
},
|
},
|
||||||
{ to: "/console/discover", label: "发现", icon: Compass, description: "bgm.tv 每日放送与豆瓣热门" },
|
{ to: "/console/discover", label: "发现", icon: Compass, description: "bgm.tv 每日放送与豆瓣热门" },
|
||||||
{ to: "/console/subscriptions", label: "订阅", icon: CalendarClock, description: "单次收录与持续追踪" },
|
{ to: "/console/subscriptions", label: "订阅", icon: CalendarClock, description: "单次收录与持续追踪" },
|
||||||
{ to: "/console/rules", label: "规则", icon: ListChecks, description: "收录策略与偏好标签" },
|
{ to: "/console/rules", label: "规则", icon: ListChecks, description: "收录策略与规则组" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -106,7 +106,7 @@ export const NAV_GROUPS: NavGroup[] = [
|
|||||||
to: "/console/logs",
|
to: "/console/logs",
|
||||||
label: "日志",
|
label: "日志",
|
||||||
icon: ScrollText,
|
icon: ScrollText,
|
||||||
description: "任务、定时与自动任务、登录与操作留痕,可实时查看",
|
description: "任务、定时任务、登录与操作记录,可实时查看",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "/console/status",
|
to: "/console/status",
|
||||||
@@ -131,7 +131,7 @@ const NAV_ALIASES: Record<string, string> = {
|
|||||||
|
|
||||||
/** 不在侧栏但有页面的路由:顶栏标题用 */
|
/** 不在侧栏但有页面的路由:顶栏标题用 */
|
||||||
const EXTRA_TITLES: Record<string, string> = {
|
const EXTRA_TITLES: Record<string, string> = {
|
||||||
"/console/preferences": "偏好标签",
|
"/console/preferences": "规则",
|
||||||
"/console/search": "搜索",
|
"/console/search": "搜索",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type * as React from "react";
|
|||||||
import { cn } from "~/lib/utils.ts";
|
import { cn } from "~/lib/utils.ts";
|
||||||
|
|
||||||
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
||||||
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
return <nav aria-label="页面路径" data-slot="breadcrumb" {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ export function revealFirstError(root?: HTMLElement | null) {
|
|||||||
/** toast 用的一句话:"有 3 处需要修改:填写模板名称" */
|
/** toast 用的一句话:"有 3 处需要修改:填写模板名称" */
|
||||||
export function formErrorSummary(errors: Record<string, string>): string {
|
export function formErrorSummary(errors: Record<string, string>): string {
|
||||||
const msgs = Object.values(errors).filter(Boolean);
|
const msgs = Object.values(errors).filter(Boolean);
|
||||||
if (msgs.length === 0) return "表单有错误";
|
if (msgs.length === 0) return "有内容需要修改";
|
||||||
return msgs.length === 1 ? `需要修改:${msgs[0]}` : `有 ${msgs.length} 处需要修改:${msgs[0]}`;
|
return msgs.length === 1 ? `需要修改:${msgs[0]}` : `有 ${msgs.length} 处需要修改:${msgs[0]}`;
|
||||||
}
|
}
|
||||||
+10
-10
@@ -24,7 +24,7 @@ const HEALTH: Record<string, Labeled> = {
|
|||||||
export const healthLabel = (v: string | null | undefined) => pick(HEALTH, v);
|
export const healthLabel = (v: string | null | undefined) => pick(HEALTH, v);
|
||||||
|
|
||||||
const DOWNLOAD: Record<string, Labeled> = {
|
const DOWNLOAD: Record<string, Labeled> = {
|
||||||
queued: { label: "排队", tone: "neutral" },
|
queued: { label: "排队中", tone: "neutral" },
|
||||||
submitting: { label: "提交中", tone: "neutral" },
|
submitting: { label: "提交中", tone: "neutral" },
|
||||||
downloading: { label: "下载中", tone: "neutral" },
|
downloading: { label: "下载中", tone: "neutral" },
|
||||||
paused: { label: "已暂停", tone: "warning" },
|
paused: { label: "已暂停", tone: "warning" },
|
||||||
@@ -46,17 +46,17 @@ const DECISION_KIND: Record<string, string> = {
|
|||||||
download_failed: "下载失败",
|
download_failed: "下载失败",
|
||||||
path_conflict: "整理冲突",
|
path_conflict: "整理冲突",
|
||||||
space_insufficient: "空间不足",
|
space_insufficient: "空间不足",
|
||||||
approval_required: "待审批",
|
approval_required: "等你批准",
|
||||||
metadata_conflict: "元数据冲突",
|
metadata_conflict: "元数据冲突",
|
||||||
source_unreachable: "来源不可达",
|
source_unreachable: "来源连不上",
|
||||||
downloader_offline: "下载器连不上",
|
downloader_offline: "下载器连不上",
|
||||||
cache_volume_unknown: "下载目录读不到容量",
|
cache_volume_unknown: "下载目录读不到容量",
|
||||||
other: "其它",
|
other: "其他",
|
||||||
};
|
};
|
||||||
export const decisionKindLabel = (v: string) => DECISION_KIND[v] ?? v;
|
export const decisionKindLabel = (v: string) => DECISION_KIND[v] ?? v;
|
||||||
|
|
||||||
const ORG: Record<string, Labeled> = {
|
const ORG: Record<string, Labeled> = {
|
||||||
queued: { label: "排队", tone: "neutral" },
|
queued: { label: "排队中", tone: "neutral" },
|
||||||
running: { label: "进行中", tone: "neutral" },
|
running: { label: "进行中", tone: "neutral" },
|
||||||
succeeded: { label: "成功", tone: "success" },
|
succeeded: { label: "成功", tone: "success" },
|
||||||
partial: { label: "部分成功", tone: "warning" },
|
partial: { label: "部分成功", tone: "warning" },
|
||||||
@@ -91,8 +91,8 @@ export const agentRunLabel = (v: string | null | undefined) => pick(AGENT_RUN, v
|
|||||||
const ENGINE_RUN: Record<string, Labeled> = {
|
const ENGINE_RUN: Record<string, Labeled> = {
|
||||||
pending: { label: "待执行", tone: "neutral" },
|
pending: { label: "待执行", tone: "neutral" },
|
||||||
running: { label: "运行中", tone: "neutral" },
|
running: { label: "运行中", tone: "neutral" },
|
||||||
sleeping: { label: "休眠(旧)", tone: "neutral" },
|
sleeping: { label: "休眠", tone: "neutral" },
|
||||||
succeeded: { label: "完成(旧)", tone: "success" },
|
succeeded: { label: "完成", tone: "success" },
|
||||||
completed: { label: "完成", tone: "success" },
|
completed: { label: "完成", tone: "success" },
|
||||||
failed: { label: "失败", tone: "destructive" },
|
failed: { label: "失败", tone: "destructive" },
|
||||||
canceled: { label: "已取消", tone: "warning" },
|
canceled: { label: "已取消", tone: "warning" },
|
||||||
@@ -156,11 +156,11 @@ export const actorTypeLabel = (t: string) => ACTOR_TYPES.find((a) => a.value ===
|
|||||||
/** 计划 statusReason(`added`、`organize:succeeded` 等)→ 中文;不认识的原样显示 */
|
/** 计划 statusReason(`added`、`organize:succeeded` 等)→ 中文;不认识的原样显示 */
|
||||||
const PLAN_REASON: Record<string, string> = {
|
const PLAN_REASON: Record<string, string> = {
|
||||||
added: "已添加到下载器",
|
added: "已添加到下载器",
|
||||||
"organize:succeeded": "整理成功",
|
"organize:succeeded": "已整理",
|
||||||
"organize:partial": "部分整理成功",
|
"organize:partial": "部分整理",
|
||||||
"organize:failed": "整理失败",
|
"organize:failed": "整理失败",
|
||||||
authorized: "已批准",
|
authorized: "已批准",
|
||||||
"reserved:agent": "智能体已预留空间",
|
"reserved:agent": "智能体已批准下载",
|
||||||
};
|
};
|
||||||
/** 不认识的内部码走原因码表,仍不认识就不显示(原码在技术信息里) */
|
/** 不认识的内部码走原因码表,仍不认识就不显示(原码在技术信息里) */
|
||||||
export const planReasonText = (v: string | null | undefined) =>
|
export const planReasonText = (v: string | null | undefined) =>
|
||||||
|
|||||||
Reference in new issue
Block a user