fix(terminal): make the saved host-login state unmistakable in the modal

The stored secret is never echoed back (security), so on reopen the blank password field
read as "not configured" / "it forgot my password". The login DOES persist (single
HostCredential row, kept across reloads); only the modal was ambiguous.

- when configured, show a green status: "Configured as <user> — password is stored. Leave
  blank to keep it; enter a new one to change it." The Remove button + gear stay, so the
  operator can still change the password or switch access.

No behaviour change — set once, stays until changed/removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/v1-foundation
boban 2026-06-25 20:08:50 +02:00
parent e1a886671b
commit 2b1e98c5d4
3 changed files with 11 additions and 0 deletions

View File

@ -37,6 +37,7 @@ return [
'host_field_key' => 'Privater SSH-Key', 'host_field_key' => 'Privater SSH-Key',
'host_field_passphrase' => 'Passphrase (optional)', 'host_field_passphrase' => 'Passphrase (optional)',
'host_secret_keep' => 'Leer lassen, um das gespeicherte Passwort zu behalten', 'host_secret_keep' => 'Leer lassen, um das gespeicherte Passwort zu behalten',
'host_configured_note' => 'Eingerichtet als :user — Passwort ist gespeichert. Leer lassen zum Behalten; neues eingeben zum Ändern.',
'host_secret_required_for_auth_change' => 'Bei Wechsel der Authentifizierungsmethode muss das Login neu eingegeben werden.', 'host_secret_required_for_auth_change' => 'Bei Wechsel der Authentifizierungsmethode muss das Login neu eingegeben werden.',
'host_security_note' => 'Dieses Login gibt dem Web-Terminal eine Shell auf dem Host. Verschlüsselt gespeichert, nur über das interne Netz genutzt.', 'host_security_note' => 'Dieses Login gibt dem Web-Terminal eine Shell auf dem Host. Verschlüsselt gespeichert, nur über das interne Netz genutzt.',
'host_save' => 'Speichern', 'host_save' => 'Speichern',

View File

@ -37,6 +37,7 @@ return [
'host_field_key' => 'Private SSH key', 'host_field_key' => 'Private SSH key',
'host_field_passphrase' => 'Passphrase (optional)', 'host_field_passphrase' => 'Passphrase (optional)',
'host_secret_keep' => 'Leave blank to keep the stored password', 'host_secret_keep' => 'Leave blank to keep the stored password',
'host_configured_note' => 'Configured as :user — password is stored. Leave blank to keep it; enter a new one to change it.',
'host_secret_required_for_auth_change' => 'Switching the authentication method requires entering the login again.', 'host_secret_required_for_auth_change' => 'Switching the authentication method requires entering the login again.',
'host_security_note' => 'This login gives the web terminal a shell on the host. Stored encrypted, used only over the internal network.', 'host_security_note' => 'This login gives the web terminal a shell on the host. Stored encrypted, used only over the internal network.',
'host_save' => 'Save', 'host_save' => 'Save',

View File

@ -9,6 +9,15 @@
</div> </div>
</div> </div>
@if ($configured)
{{-- Make the saved state unmistakable: the stored secret is never shown (security), so without
this the empty password field reads as "not configured". --}}
<div class="mt-4 flex items-start gap-2 rounded-md border border-online/25 bg-online/5 px-3 py-2.5 font-mono text-[11px] leading-relaxed text-ink-2">
<x-icon name="shield" class="mt-px h-3.5 w-3.5 shrink-0 text-online" />
<span>{{ __('terminal.host_configured_note', ['user' => $username]) }}</span>
</div>
@endif
<div class="mt-4 space-y-3"> <div class="mt-4 space-y-3">
{{-- Target is fixed to the local machine (the Docker host) only the login is asked for. --}} {{-- Target is fixed to the local machine (the Docker host) only the login is asked for. --}}
<div class="grid grid-cols-1 gap-3 sm:grid-cols-3"> <div class="grid grid-cols-1 gap-3 sm:grid-cols-3">