panel-redesign: sign-in without an administrator follows its mockup

- panel.css: .sp-signin-form .sp-form, as theme.css has it now.
  - templates/login.html: the state is div.sp-form with the mockup's
    heading and line; the empty form of ef8a82e is gone.
  - tests: the hint is checked by its new wording, and that the page
    carries no form at all.

Evidence
  - docs/assets/panel-redesign/evidence/login-no-admin.png: 1440x900,
    headless Edge, real templates served locally (no Docker here).
    login.png re-shot after the selector change: byte-identical.
  - go test -count=1 ./internal/web/... : ok (web, auth, handlers,
    validate, view)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mix
2026-10-09 23:33:26 +03:00
co-authored by Claude Opus 5.5
parent 2b4a158423
commit f59f4778c9
6 changed files with 15 additions and 14 deletions
+3 -4
View File
@@ -53,12 +53,11 @@ func TestLoginShowsAnErrorEscaped(t *testing.T) {
func TestLoginWithoutAnAdministratorHasNoForm(t *testing.T) {
out := renderSignedOut(t, "login", NewLoginSetupHint("mail.example.org"))
if !strings.Contains(out, "No administrator has been created yet") {
if !strings.Contains(out, "No administrator yet") || !strings.Contains(out, "one-time setup link") {
t.Error("the setup hint is missing")
}
// The element stays (the signed-out layout centres the column through it) but
// nothing in it can be filled in or sent.
for _, bad := range []string{`action=`, `<input`, `<button`, `name="password"`, `name="username"`} {
// Nothing on it can be filled in or sent.
for _, bad := range []string{`<form`, `action=`, `<input`, `<button`, `name="password"`, `name="username"`} {
if strings.Contains(out, bad) {
t.Errorf("the hint page carries %q", bad)
}