feat(frontend): écran Appareils et parcours d'appairage nommé (#77 F1/F2)
Expose la gestion des appareils appairés introduite en B1-B4, sur une surface unique partagée par le web et le desktop. - Écran Appareils : liste, renommage, révocation unitaire ou globale, activité formatée, panneau de code éphémère. - Le parcours d'appairage demande un nom d'appareil, pour qu'une révocation porte sur quelque chose d'identifiable par l'utilisateur. - Gateways DeviceGateway en trois adapters (Tauri, HTTP, Mock), le port restant le seul contrat connu de la feature. Les erreurs sont mappées localement et le message du serveur n'est jamais affiché tel quel : un échec d'appairage ne doit pas devenir un oracle pour qui teste des codes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -16,8 +16,11 @@
|
||||
* the whole reason this screen is worded the way it is; the help text under
|
||||
* the field says so explicitly.
|
||||
*
|
||||
* The pairing code is runtime-only: shown while running, never rendered into a
|
||||
* persisted field, never mixed with the upstream value.
|
||||
* This screen no longer shows a pairing code (#77). A code is not a property of
|
||||
* a running server — it exists only when someone asks for one — so it lives in
|
||||
* the Appareils surface next to the devices it authorises. What is left here is
|
||||
* a signpost: starting the server from this screen and finding no way to pair is
|
||||
* a dead end.
|
||||
*/
|
||||
|
||||
import { useState } from "react";
|
||||
@ -334,21 +337,12 @@ export function DeploymentSettings() {
|
||||
</Panel>
|
||||
)}
|
||||
|
||||
{/* ── Pairing: runtime-only secret, isolated from the upstream ──────── */}
|
||||
{/* ── Pairing moved to its own surface (#77) — leave a signpost ─────── */}
|
||||
<Panel title="Pairing">
|
||||
{running && status.pairingCode ? (
|
||||
<div className="flex flex-col gap-2">
|
||||
<ReadOnlyValue value={status.pairingCode} copyLabel="copy pairing code" />
|
||||
<p className="text-xs text-muted">
|
||||
Temporary code. It disappears when the server stops. Do not save it
|
||||
in configuration files.
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-muted">
|
||||
Start the server to generate a pairing code.
|
||||
</p>
|
||||
)}
|
||||
<p className="text-sm text-muted">
|
||||
Pairing is managed in <span className="text-content">Settings → Appareils</span>,
|
||||
where you can generate a code and revoke devices.
|
||||
</p>
|
||||
</Panel>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user