mirror of
https://github.com/JetSprow/J-Board-Lite.git
synced 2026-05-01 01:14:10 +05:30
polish: refine lite admin controls
This commit is contained in:
@@ -21,7 +21,7 @@ export function InboundsTab({ node }: { node: NodeDetail }) {
|
||||
return (
|
||||
<EmptyState
|
||||
title="暂无已同步入站"
|
||||
description="请先在 3x-ui 面板创建入站,然后回到节点列表点击测试并同步入站。"
|
||||
description="在 3x-ui 创建后回到节点列表同步。"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ export function InboundsTab({ node }: { node: NodeDetail }) {
|
||||
return (
|
||||
<div className="space-y-4 pt-4">
|
||||
<p className="rounded-lg border border-border bg-muted/30 px-4 py-3 text-xs text-muted-foreground">
|
||||
入站配置由 3x-ui 面板维护;本页仅展示已同步的线路,并允许调整前台展示名称。
|
||||
入站由 3x-ui 维护,这里只调整前台名称。
|
||||
</p>
|
||||
<div className="surface-card divide-y divide-border/60 overflow-hidden rounded-xl">
|
||||
{node.inbounds.map((inbound) => (
|
||||
|
||||
@@ -77,7 +77,9 @@ function NodeCard({ node, siteUrl }: { node: NodeServerRow; siteUrl: string | nu
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<p className="rounded-lg border border-dashed border-border bg-muted/20 px-4 py-3 text-xs text-muted-foreground">暂无已同步入站,请在 3x-ui 创建入站后点击同步</p>
|
||||
<p className="rounded-lg border border-dashed border-border bg-muted/20 px-4 py-3 text-xs text-muted-foreground">
|
||||
暂无已同步入站。
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="flex flex-wrap items-center gap-2 xl:justify-end">
|
||||
@@ -114,7 +116,7 @@ export function NodeCardList({ nodes, siteUrl }: { nodes: NodeServerRow[]; siteU
|
||||
<div className="p-5">
|
||||
<EmptyState
|
||||
title="暂无节点"
|
||||
description="添加 3x-ui 节点后,可以同步入站并绑定到代理套餐。"
|
||||
description="添加节点后同步入站并绑定套餐。"
|
||||
action={<NodeForm triggerLabel="添加节点" />}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ export function InboundDeleteButton({
|
||||
variant="ghost"
|
||||
className="h-7 px-2 text-destructive hover:text-destructive"
|
||||
title="删除这个线路入口?"
|
||||
description="这里只会移除本地同步记录,不会删除 3x-ui 面板中的入站。请确认没有套餐仍依赖它。"
|
||||
description="只移除本地记录,不删除 3x-ui 入站。"
|
||||
confirmLabel="删除入口"
|
||||
successMessage="线路入口已删除"
|
||||
errorMessage="删除线路入口失败"
|
||||
|
||||
@@ -91,7 +91,7 @@ export function NodeActions({ node, siteUrl }: { node: NodeActionValue; siteUrl:
|
||||
size="sm"
|
||||
variant="outline"
|
||||
title="撤销这个探测 Token?"
|
||||
description="撤销后,延迟、线路探测和节点日志风控程序将无法继续上报数据。"
|
||||
description="撤销后探测 Agent 停止上报。"
|
||||
confirmLabel="撤销 Token"
|
||||
successMessage="探测 Token 已撤销"
|
||||
errorMessage="撤销失败"
|
||||
@@ -105,7 +105,7 @@ export function NodeActions({ node, siteUrl }: { node: NodeActionValue; siteUrl:
|
||||
size="sm"
|
||||
variant="destructive"
|
||||
title="删除这个节点?"
|
||||
description="节点、线路入口和相关探测数据会被清理。请确认没有套餐仍依赖它。"
|
||||
description="会清理节点、入口和探测数据。"
|
||||
confirmLabel="删除节点"
|
||||
successMessage="节点已删除"
|
||||
errorMessage="删除失败"
|
||||
@@ -121,7 +121,7 @@ export function NodeActions({ node, siteUrl }: { node: NodeActionValue; siteUrl:
|
||||
<KeyRound className="size-3.5" /> PROBE TOKEN
|
||||
</div>
|
||||
<DialogTitle>探测 Token — {node.name}</DialogTitle>
|
||||
<DialogDescription>请立即复制 Token 或一键安装命令,关闭后将无法再次查看。</DialogDescription>
|
||||
<DialogDescription>关闭后无法再次查看。</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
@@ -166,11 +166,11 @@ export function NodeActions({ node, siteUrl }: { node: NodeActionValue; siteUrl:
|
||||
|
||||
{!siteUrl && (
|
||||
<p className="rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs leading-5 text-amber-700 dark:text-amber-200">
|
||||
建议先到系统设置填写网站 URL,否则从本地地址打开后台时命令会带本机地址。
|
||||
建议先填写网站 URL,避免安装命令带本机地址。
|
||||
</p>
|
||||
)}
|
||||
<p className="text-xs leading-5 text-muted-foreground">
|
||||
此 Agent 用于 `/api/agent/latency`、`/api/agent/trace` 探测上报;安装脚本会自动查找 3x-ui/Xray access log,找到后启用节点日志风控。Agent 只读日志,不修改 3x-ui 配置。
|
||||
Agent 只读日志,用于延迟、路径和风控上报。
|
||||
</p>
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
@@ -68,9 +68,7 @@ export function NodeForm({
|
||||
<DialogContent className="max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{isEdit ? "编辑 3x-ui 节点" : "添加 3x-ui 节点"}</DialogTitle>
|
||||
<DialogDescription>
|
||||
保存后会登录 3x-ui 并同步面板中的入站线路;入站请在 3x-ui 面板内维护。
|
||||
</DialogDescription>
|
||||
<DialogDescription>保存后登录 3x-ui 并同步入站。</DialogDescription>
|
||||
</DialogHeader>
|
||||
<form action={isEdit ? handleEdit : handleCreate} className="form-panel space-y-5">
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
@@ -94,16 +92,14 @@ export function NodeForm({
|
||||
<Input
|
||||
name="panelPassword"
|
||||
type="password"
|
||||
placeholder={isEdit ? "留空则沿用当前密码" : "请输入面板密码"}
|
||||
placeholder={isEdit ? "留空不变" : "面板密码"}
|
||||
required={!isEdit}
|
||||
autoComplete="new-password"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p className="text-xs leading-5 text-muted-foreground">
|
||||
延迟和线路探测仍使用探测 Token;节点开通、暂停、删除客户端均回归 3x-ui 面板 API。
|
||||
</p>
|
||||
<p className="text-xs leading-5 text-muted-foreground">探测使用 Token,客户端操作走 3x-ui API。</p>
|
||||
<PendingSubmitButton size="lg" className="w-full" pendingLabel={isEdit ? "保存中..." : "创建中..."}>
|
||||
{isEdit ? "保存并同步入站" : "创建并同步入站"}
|
||||
</PendingSubmitButton>
|
||||
|
||||
Reference in New Issue
Block a user