From 2b1e98c5d4b1be67c580df0880f691bb929434d5 Mon Sep 17 00:00:00 2001 From: boban Date: Thu, 25 Jun 2026 20:08:50 +0200 Subject: [PATCH] fix(terminal): make the saved host-login state unmistakable in the modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 — 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 --- lang/de/terminal.php | 1 + lang/en/terminal.php | 1 + resources/views/livewire/modals/host-shell.blade.php | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/lang/de/terminal.php b/lang/de/terminal.php index 5b2270e..20458ee 100644 --- a/lang/de/terminal.php +++ b/lang/de/terminal.php @@ -37,6 +37,7 @@ return [ 'host_field_key' => 'Privater SSH-Key', 'host_field_passphrase' => 'Passphrase (optional)', '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_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', diff --git a/lang/en/terminal.php b/lang/en/terminal.php index f1f2192..88ca869 100644 --- a/lang/en/terminal.php +++ b/lang/en/terminal.php @@ -37,6 +37,7 @@ return [ 'host_field_key' => 'Private SSH key', 'host_field_passphrase' => 'Passphrase (optional)', '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_security_note' => 'This login gives the web terminal a shell on the host. Stored encrypted, used only over the internal network.', 'host_save' => 'Save', diff --git a/resources/views/livewire/modals/host-shell.blade.php b/resources/views/livewire/modals/host-shell.blade.php index 1114983..a12148c 100644 --- a/resources/views/livewire/modals/host-shell.blade.php +++ b/resources/views/livewire/modals/host-shell.blade.php @@ -9,6 +9,15 @@ + @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". --}} +
+ + {{ __('terminal.host_configured_note', ['user' => $username]) }} +
+ @endif +
{{-- Target is fixed to the local machine (the Docker host) — only the login is asked for. --}}