文案(原站视图):重写浏览器会话、登录态、重连提示文案
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
822d4e7c63
commit
5aa19a9a9b
5 files changed
+13
-13
No files matched your search
@@ -48,9 +48,9 @@ const WAITING_TEXT: Record<string, string> = {
|
||||
captcha: "登录页需要验证码",
|
||||
challenge: "页面需要人工验证",
|
||||
two_factor: "需要二次验证或本人设备确认",
|
||||
challenge_unsolved: "自动处理页面挑战未成功",
|
||||
challenge_unsolved: "页面验证没有自动通过",
|
||||
login_required: "登录已失效:接管后在画面里登录一次,交还后全站生效",
|
||||
lease_expired: "接管超时未交还",
|
||||
lease_expired: "接管超时,没有交还",
|
||||
agent_request: "智能体请求人工处理",
|
||||
human_released_waiting: "交还时选择继续等待",
|
||||
};
|
||||
@@ -80,9 +80,9 @@ export function credentialBadge(
|
||||
case "injected":
|
||||
return { tone: "success", text: `登录态:${src ?? "已注入"}`, title };
|
||||
case "expired":
|
||||
return { tone: "warning", text: "登录态已过期:在画面里登录一次即可全站生效", title };
|
||||
return { tone: "warning", text: "登录态已过期:在画面里登录一次,全站生效", title };
|
||||
case "none":
|
||||
return { tone: "neutral", text: "账号没有登录态:在画面里登录一次即可全站生效", title };
|
||||
return { tone: "neutral", text: "账号没有登录态:在画面里登录一次,全站生效", title };
|
||||
case "unsupported":
|
||||
return { tone: "warning", text: "浏览器服务不支持注入登录态", title };
|
||||
default:
|
||||
|
||||
@@ -81,7 +81,7 @@ export function SiteOriginPanel({ site }: { site: SiteListItem }) {
|
||||
if (!s || !canDesktop || mode === "screenshot") {
|
||||
let note: string | null = null;
|
||||
if (s && desktop && !desktop.available && desktop.reason) note = `桌面模式不可用:${desktop.reason}。`;
|
||||
else if (s && desktop?.available && !secure) note = "桌面模式需要通过 HTTPS 访问控制台,当前使用截图模式。";
|
||||
else if (s && desktop?.available && !secure) note = "桌面模式需要用 HTTPS 打开控制台,现在是截图模式。";
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{note || (canDesktop && mode === "screenshot") ? (
|
||||
|
||||
@@ -109,7 +109,7 @@ export function ReloadNotice({ session }: { session: BrowserSessionView }) {
|
||||
if (!at || dismissed === at) return null;
|
||||
return (
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<StatusBadge tone="warning">浏览器重启过,页面已重新加载,请核对</StatusBadge>
|
||||
<StatusBadge tone="warning">浏览器重启过,页面已重新加载,表单输入和滚动位置已丢失</StatusBadge>
|
||||
<Button variant="ghost" size="xs" onClick={() => setDismissed(at)}>
|
||||
知道了
|
||||
</Button>
|
||||
|
||||
@@ -40,7 +40,7 @@ export function ResourceDownload({ session }: { session: BrowserSessionView }) {
|
||||
} else if (result.submitted) {
|
||||
setPlanId(result.plan?.id ?? null);
|
||||
toast.success("已提交下载");
|
||||
} else toast.warning(result.rejected.map((v) => v.message).join(";") || "没有提交下载");
|
||||
} else toast.warning(result.rejected.map((v) => v.message).join(";") || "没有提交");
|
||||
}
|
||||
} catch (e) {
|
||||
toast.error(errorMessage(e));
|
||||
@@ -53,7 +53,7 @@ export function ResourceDownload({ session }: { session: BrowserSessionView }) {
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<Button size="sm" disabled={busy || session.controller === "closed"} onClick={() => void prepare(false)}>
|
||||
<Download />
|
||||
{busy ? "正在处理…" : "下载当前资源"}
|
||||
{busy ? "提交中…" : "下载当前资源"}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
|
||||
@@ -88,7 +88,7 @@ export function SiteOriginView({ site }: { site: SiteListItem }) {
|
||||
<EmptyState
|
||||
icon={Globe}
|
||||
title="没有启用的浏览器服务"
|
||||
description="登记 camofox 地址与访问凭证后,这里显示站点的真实页面。"
|
||||
description="在设置里登记 camofox 地址和凭证后,这里显示站点的原站页面。"
|
||||
/>
|
||||
);
|
||||
if (!site.enabled) return <EmptyState icon={Globe} title="站点已停用" description="启用站点后才能打开原站页面。" />;
|
||||
@@ -97,7 +97,7 @@ export function SiteOriginView({ site }: { site: SiteListItem }) {
|
||||
<EmptyState
|
||||
icon={Globe}
|
||||
title="还没有打开这个站点的浏览器会话"
|
||||
description="打开后显示站点首页;验证码等需本人操作在此完成。"
|
||||
description="打开后显示站点首页。验证码等需要本人操作的步骤在这里完成。"
|
||||
action={
|
||||
<Button
|
||||
size="sm"
|
||||
@@ -152,7 +152,7 @@ export function SiteOriginView({ site }: { site: SiteListItem }) {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<p className="text-caption text-muted-foreground">验证码等需本人操作在此完成。</p>
|
||||
<p className="text-caption text-muted-foreground">验证码等需要本人操作的步骤在这里完成。</p>
|
||||
<ReloadNotice session={s} />
|
||||
|
||||
{site.kind === "subtitle" ? <SubtitleFromPage session={s} /> : <ResourceDownload session={s} />}
|
||||
@@ -169,8 +169,8 @@ export function SiteOriginView({ site }: { site: SiteListItem }) {
|
||||
<StatusBadge tone={cred.tone}>{cred.text}</StatusBadge>
|
||||
</span>
|
||||
) : null}
|
||||
{unsupported ? <StatusBadge tone="destructive">该浏览器服务不支持画面与输入</StatusBadge> : null}
|
||||
{unverified ? <StatusBadge tone="warning">画面与输入未对真实实例核验</StatusBadge> : null}
|
||||
{unsupported ? <StatusBadge tone="destructive">这个浏览器服务不支持画面和输入</StatusBadge> : null}
|
||||
{unverified ? <StatusBadge tone="warning">画面和输入没有在真实实例上验证过</StatusBadge> : null}
|
||||
<div className="ml-auto flex flex-wrap items-center gap-2">
|
||||
{human ? (
|
||||
<Button
|
||||
|
||||
Reference in new issue
Block a user