refactor(csms): 更新 OCPP 认证相关文本
This commit is contained in:
@@ -263,11 +263,11 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
|
|||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<>
|
<>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<Tooltip.Content>重置 OCPP 连接密码</Tooltip.Content>
|
<Tooltip.Content>重置 OCPP 认证密钥</Tooltip.Content>
|
||||||
<Tooltip.Trigger>
|
<Tooltip.Trigger>
|
||||||
<Button size="sm" variant="ghost" isDisabled={resetBusy} onPress={handleResetPassword}>
|
<Button size="sm" variant="ghost" isDisabled={resetBusy} onPress={handleResetPassword}>
|
||||||
{resetBusy ? <Spinner size="sm" /> : <Key className="size-4" />}
|
{resetBusy ? <Spinner size="sm" /> : <Key className="size-4" />}
|
||||||
重置密码
|
重置密钥
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip.Trigger>
|
</Tooltip.Trigger>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@@ -599,20 +599,20 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
|
|||||||
<Modal.Container scroll="outside">
|
<Modal.Container scroll="outside">
|
||||||
<Modal.Dialog className="sm:max-w-md">
|
<Modal.Dialog className="sm:max-w-md">
|
||||||
<Modal.Header>
|
<Modal.Header>
|
||||||
<Modal.Heading>密码已重置 — 请保存新密码</Modal.Heading>
|
<Modal.Heading>密钥已重置</Modal.Heading>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body className="space-y-4">
|
<Modal.Body className="space-y-4">
|
||||||
<p className="text-sm text-warning font-medium">
|
<p className="text-sm text-warning font-medium">
|
||||||
⚠️ 此密码仅显示一次,关闭后无法再次查看。旧密码已立即失效,请更新固件配置。
|
此密钥仅显示一次。旧密钥已立即失效,请更新固件配置。
|
||||||
</p>
|
</p>
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1.5">
|
||||||
<p className="text-xs text-muted font-medium">新 OCPP Basic Auth 密码</p>
|
<p className="text-xs text-muted font-medium">新 OCPP Basic Auth 密钥</p>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<code className="flex-1 rounded-md bg-surface-secondary px-3 py-2 text-sm font-mono text-foreground select-all">
|
<code className="flex-1 rounded-md bg-surface-secondary px-3 py-2 text-sm font-mono text-foreground select-all">
|
||||||
{resetResult?.plainPassword}
|
{resetResult?.plainPassword}
|
||||||
</code>
|
</code>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<Tooltip.Content>{resetCopied ? "已复制" : "复制密码"}</Tooltip.Content>
|
<Tooltip.Content>{resetCopied ? "已复制" : "复制密钥"}</Tooltip.Content>
|
||||||
<Tooltip.Trigger>
|
<Tooltip.Trigger>
|
||||||
<Button
|
<Button
|
||||||
isIconOnly
|
isIconOnly
|
||||||
@@ -629,7 +629,7 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
|
|||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
<Modal.Footer className="flex justify-end">
|
<Modal.Footer className="flex justify-end">
|
||||||
<Button onPress={() => { setResetResult(null); setResetCopied(false); }}>
|
<Button onPress={() => { setResetResult(null); setResetCopied(false); }}>
|
||||||
我已保存密码
|
我已保存密钥
|
||||||
</Button>
|
</Button>
|
||||||
</Modal.Footer>
|
</Modal.Footer>
|
||||||
</Modal.Dialog>
|
</Modal.Dialog>
|
||||||
|
|||||||
@@ -410,17 +410,17 @@ export default function ChargePointsPage() {
|
|||||||
<Modal.CloseTrigger />
|
<Modal.CloseTrigger />
|
||||||
<Modal.Header>
|
<Modal.Header>
|
||||||
<Modal.Heading>
|
<Modal.Heading>
|
||||||
{qrTarget?.deviceName ?? qrTarget?.chargePointIdentifier} — 充电二维码
|
{qrTarget?.deviceName ?? qrTarget?.chargePointIdentifier} 固定二维码
|
||||||
</Modal.Heading>
|
</Modal.Heading>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body className="space-y-4">
|
<Modal.Body className="space-y-4">
|
||||||
<p className="text-sm text-muted">
|
<p className="text-sm text-muted">
|
||||||
将以下二维码张贴在对应充电口上,用户扫码后可直接选卡启动充电。
|
将二维码张贴在对应充电口上,用户扫码后可直接选卡启动充电。
|
||||||
</p>
|
</p>
|
||||||
{qrTarget &&
|
{qrTarget &&
|
||||||
qrTarget.connectors.filter((c) => c.connectorId > 0).length === 0 && (
|
qrTarget.connectors.filter((c) => c.connectorId > 0).length === 0 && (
|
||||||
<p className="text-sm text-muted">
|
<p className="text-sm text-muted">
|
||||||
该充电桩暂无接口信息,请等待设备上线后再尝试。
|
该充电桩暂无接口信息,请等待设备首次上线后再尝试。
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<div className="grid gap-4 grid-cols-2 sm:grid-cols-3">
|
<div className="grid gap-4 grid-cols-2 sm:grid-cols-3">
|
||||||
@@ -476,14 +476,14 @@ export default function ChargePointsPage() {
|
|||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body className="space-y-4">
|
<Modal.Body className="space-y-4">
|
||||||
<p className="text-sm text-warning font-medium">
|
<p className="text-sm text-warning font-medium">
|
||||||
充电桩认证密码只显示一次,请立即烧录或妥善保存
|
此认证密钥只显示一次,请立即烧录或妥善保存
|
||||||
</p>
|
</p>
|
||||||
<TextField fullWidth isReadOnly>
|
<TextField fullWidth isReadOnly>
|
||||||
<Label className="text-sm font-medium">充电桩标识符</Label>
|
<Label className="text-sm font-medium">充电桩标识符</Label>
|
||||||
<Input value={createdCp?.chargePointIdentifier ?? ""} className="font-mono" />
|
<Input value={createdCp?.chargePointIdentifier ?? ""} className="font-mono" />
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fullWidth isReadOnly>
|
<TextField fullWidth isReadOnly>
|
||||||
<Label className="text-sm font-medium">OCPP Basic Auth 密码</Label>
|
<Label className="text-sm font-medium">OCPP Basic Auth 密钥</Label>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<InputGroup.Input
|
<InputGroup.Input
|
||||||
value={createdCp?.plainPassword ?? ""}
|
value={createdCp?.plainPassword ?? ""}
|
||||||
@@ -491,7 +491,7 @@ export default function ChargePointsPage() {
|
|||||||
/>
|
/>
|
||||||
<InputGroup.Suffix>
|
<InputGroup.Suffix>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<Tooltip.Content>{copied ? "已复制" : "复制密码"}</Tooltip.Content>
|
<Tooltip.Content>{copied ? "已复制" : "复制密钥"}</Tooltip.Content>
|
||||||
<Tooltip.Trigger>
|
<Tooltip.Trigger>
|
||||||
<Button
|
<Button
|
||||||
isIconOnly
|
isIconOnly
|
||||||
@@ -521,7 +521,7 @@ export default function ChargePointsPage() {
|
|||||||
/>
|
/>
|
||||||
</TextField>
|
</TextField>
|
||||||
<p className="text-xs text-muted">
|
<p className="text-xs text-muted">
|
||||||
固件连接时需设置 HTTP 头:
|
设备连接时需设置 HTTP 头:
|
||||||
<br />
|
<br />
|
||||||
<code className="text-foreground">
|
<code className="text-foreground">
|
||||||
Authorization: Basic <base64({createdCp?.chargePointIdentifier}
|
Authorization: Basic <base64({createdCp?.chargePointIdentifier}
|
||||||
@@ -537,7 +537,7 @@ export default function ChargePointsPage() {
|
|||||||
setCopied(false);
|
setCopied(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
我已保存密码
|
我已保存密钥
|
||||||
</Button>
|
</Button>
|
||||||
</Modal.Footer>
|
</Modal.Footer>
|
||||||
</Modal.Dialog>
|
</Modal.Dialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user