redesign(system): compose Domain/TLS/Release-Kanal into a 2-column layout

The System page was just constrained to max-w-3xl — narrower, not designed.
Rework it into an intentional composition at max-w-5xl:

- Critical alerts (restart-required + bare-IP) are now full-width banners
  above the working area, not buried in stacked inset blocks.
- A 2-column lg grid separates "do" from "know": left/main panel holds the
  actionable form (domain input + Speichern, TLS-mode selector); right/side
  panel is the status & recovery stack (access address, TLS state, SSH reset).
- Release-Kanal stays a full-width band below. Everything stacks to one
  column on mobile.
- Header HTTPS/Plaintext pill made more prominent; domain Save promoted to
  the primary action.

All wire bindings (confirmDomain, confirmTlsMode, restartNow, restartPending/
restartRequested) and every __() key preserved; two new section-label keys
(section_config, section_status) added with DE/EN parity. Tactical-Terminal
tokens only, no inline styles, existing component kit reused.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat/v1-foundation
boban 2026-06-15 03:06:49 +02:00
parent 4eeff4916a
commit 7e1d342844
3 changed files with 164 additions and 131 deletions

View File

@ -9,6 +9,10 @@ return [
'https_active' => 'HTTPS aktiv', 'https_active' => 'HTTPS aktiv',
'https_plain' => 'Klartext-HTTP', 'https_plain' => 'Klartext-HTTP',
// Section labels (redesigned 2-column layout)
'section_config' => 'Konfiguration',
'section_status' => 'Status & Wiederherstellung',
// Domain & TLS panel // Domain & TLS panel
'tls_title' => 'Domain & TLS', 'tls_title' => 'Domain & TLS',
'tls_subtitle' => 'Erreichbarkeit des Panels und Let\'s-Encrypt-Zertifikat', 'tls_subtitle' => 'Erreichbarkeit des Panels und Let\'s-Encrypt-Zertifikat',

View File

@ -9,6 +9,10 @@ return [
'https_active' => 'HTTPS active', 'https_active' => 'HTTPS active',
'https_plain' => 'Plaintext HTTP', 'https_plain' => 'Plaintext HTTP',
// Section labels (redesigned 2-column layout)
'section_config' => 'Configuration',
'section_status' => 'Status & recovery',
// Domain & TLS panel // Domain & TLS panel
'tls_title' => 'Domain & TLS', 'tls_title' => 'Domain & TLS',
'tls_subtitle' => 'Panel reachability and Let\'s Encrypt certificate', 'tls_subtitle' => 'Panel reachability and Let\'s Encrypt certificate',

View File

@ -1,4 +1,4 @@
<div class="mx-auto max-w-3xl space-y-5"> <div class="mx-auto max-w-5xl space-y-5">
{{-- Header --}} {{-- Header --}}
<div class="flex flex-wrap items-center gap-4 rounded-xl border border-line bg-surface p-5 shadow-panel"> <div class="flex flex-wrap items-center gap-4 rounded-xl border border-line bg-surface p-5 shadow-panel">
<span class="grid h-14 w-14 shrink-0 place-items-center rounded-xl border border-accent/25 bg-accent/10 text-accent"> <span class="grid h-14 w-14 shrink-0 place-items-center rounded-xl border border-accent/25 bg-accent/10 text-accent">
@ -10,161 +10,186 @@
<p class="truncate font-mono text-[11px] text-ink-3">{{ __('system.subheading') }}</p> <p class="truncate font-mono text-[11px] text-ink-3">{{ __('system.subheading') }}</p>
</div> </div>
<span @class([ <span @class([
'inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 font-mono text-[11px]', 'inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 font-mono text-xs',
'border-online/30 text-online' => $hasTls, 'border-online/30 bg-online/10 text-online' => $hasTls,
'border-warning/30 text-warning' => ! $hasTls, 'border-warning/30 bg-warning/10 text-warning' => ! $hasTls,
])> ])>
<x-status-dot :status="$hasTls ? 'online' : 'warning'" />{{ $hasTls ? __('system.https_active') : __('system.https_plain') }} <x-status-dot :status="$hasTls ? 'online' : 'warning'" />{{ $hasTls ? __('system.https_active') : __('system.https_plain') }}
</span> </span>
</div> </div>
{{-- Domain & TLS --}} {{-- ── Critical alerts (full-width, above the grid) ─────────────────────────
<x-panel :title="__('system.tls_title')" :subtitle="__('system.tls_subtitle')"> Restart-required and bare-IP notices stay prominent banners never buried
{{-- Current TLS state --}} in a sidebar. --}}
@if ($hasTls)
<div class="mb-4 flex items-start gap-3 rounded-md border border-online/25 bg-online/5 p-3">
<x-icon name="shield" class="mt-0.5 h-4 w-4 shrink-0 text-online" />
<div class="min-w-0">
<p class="text-sm text-ink">{{ __('system.tls_active_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] text-ink-3">{{ __('system.tls_active_body_pre') }}
<a href="{{ $panelUrl }}" class="break-all text-accent-text hover:underline">{{ $panelUrl }}</a> ·
{{ __('system.tls_active_body_post') }}</p>
</div>
</div>
@else
<div class="mb-4 flex items-start gap-3 rounded-md border border-warning/25 bg-warning/5 p-3">
<x-icon name="alert" class="mt-0.5 h-4 w-4 shrink-0 text-warning" />
<div class="min-w-0">
<p class="text-sm text-ink">{{ __('system.tls_bare_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] text-ink-3">{{ __('system.tls_bare_body') }}</p>
</div>
</div>
@endif
{{-- Last-resort recovery: SSH into the host and reset admin access. --}}
<div class="mb-4 flex items-start gap-2.5 text-ink-4">
<x-icon name="shield" class="mt-0.5 h-4 w-4 shrink-0" />
<p class="font-mono text-[11px] leading-relaxed">{{ __('system.ssh_reset_hint') }}</p>
</div>
{{-- Restart-required notice (shown after a successful save). One-click: the button
writes a sentinel a HOST-side watcher reacts to and restarts the stack the
container never gets the Docker socket. No terminal needed. --}}
@if ($restartPending)
<div class="mb-4 flex items-start gap-3 rounded-md border border-warning/30 bg-warning/10 p-3">
<x-icon name="alert" class="mt-0.5 h-4 w-4 shrink-0 text-warning" />
<div class="min-w-0 flex-1">
<p class="text-sm text-ink">{{ __('system.restart_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] leading-relaxed text-ink-3">{{ __('system.restart_body') }}</p>
{{-- Restart-required notice (shown after a successful save). One-click: the button
writes a sentinel a HOST-side watcher reacts to and restarts the stack the
container never gets the Docker socket. No terminal needed. --}}
@if ($restartPending)
<div class="flex items-start gap-3 rounded-xl border border-warning/30 bg-warning/10 p-4 shadow-panel">
<x-icon name="alert" class="mt-0.5 h-5 w-5 shrink-0 text-warning" />
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-start justify-between gap-3">
<div class="min-w-0">
<p class="font-display text-sm font-semibold text-ink">{{ __('system.restart_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] leading-relaxed text-ink-3">{{ __('system.restart_body') }}</p>
</div>
@if ($restartRequested) @if ($restartRequested)
<p class="mt-2 flex items-center gap-2 font-mono text-[11px] text-accent-text"> <p class="flex shrink-0 items-center gap-2 font-mono text-[11px] text-accent-text">
<x-icon name="rotate" class="h-3.5 w-3.5 shrink-0" />{{ __('system.restart_running') }} <x-icon name="rotate" class="h-3.5 w-3.5 shrink-0" />{{ __('system.restart_running') }}
</p> </p>
@else @else
<div class="mt-3"> <x-btn variant="primary" wire:click="restartNow" wire:loading.attr="disabled" wire:target="restartNow" class="shrink-0">
<x-btn variant="primary" wire:click="restartNow" wire:loading.attr="disabled" wire:target="restartNow"> <x-icon name="rotate" class="h-3.5 w-3.5" /> {{ __('system.restart_now') }}
<x-icon name="rotate" class="h-3.5 w-3.5" /> {{ __('system.restart_now') }} </x-btn>
</x-btn> @endif
</div>
<p class="mt-2 font-mono text-[11px] leading-relaxed text-ink-4">{{ __('system.restart_watcher_hint') }}</p>
<p class="mt-1 font-mono text-[11px] leading-relaxed text-ink-4">{{ __('system.restart_lockout_hint') }}</p>
</div>
</div>
@endif
{{-- Bare-IP warning: no domain set plaintext HTTP. Full-width call to action. --}}
@unless ($hasTls)
<div class="flex items-start gap-3 rounded-xl border border-warning/25 bg-warning/5 p-4 shadow-panel">
<x-icon name="alert" class="mt-0.5 h-5 w-5 shrink-0 text-warning" />
<div class="min-w-0">
<p class="font-display text-sm font-semibold text-ink">{{ __('system.tls_bare_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] leading-relaxed text-ink-3">{{ __('system.tls_bare_body') }}</p>
</div>
</div>
@endunless
{{-- ── 2-column working area ────────────────────────────────────────────────
LEFT (main): the actionable form domain + Speichern, TLS-mode selector.
RIGHT (side): the status & recovery stack access address, TLS state, SSH reset. --}}
<div class="grid grid-cols-1 gap-5 lg:grid-cols-3">
{{-- LEFT / main column "DO" ────────────────────────────────────────── --}}
<x-panel :title="__('system.tls_title')" :subtitle="__('system.tls_subtitle')" class="lg:col-span-2">
<div class="space-y-6">
{{-- Editable panel domain. Saving persists it and asks for a restart; on restart
app URL, the Reverb endpoint, Caddy's cert and the secure cookie re-derive from it. --}}
<div>
<p class="mb-3 font-mono text-[11px] uppercase tracking-[0.18em] text-ink-4">{{ __('system.section_config') }}</p>
<label for="domainInput" class="mb-1 block text-sm text-ink-2">{{ __('system.domain') }}</label>
<div class="flex flex-col gap-2 sm:flex-row">
<input wire:model="domainInput" id="domainInput" type="text" autocomplete="off"
autocapitalize="off" spellcheck="false"
placeholder="{{ __('system.domain_placeholder') }}"
class="h-9 w-full rounded-md border border-line bg-inset px-3 font-mono text-sm text-ink placeholder:text-ink-4 focus:border-accent/40 focus:outline-none" />
<x-btn variant="primary" wire:click="confirmDomain" wire:loading.attr="disabled" class="shrink-0">
<x-icon name="save" class="h-3.5 w-3.5" /> {{ __('common.save') }}
</x-btn>
</div>
@error('domainInput')
<p class="mt-1.5 font-mono text-[11px] text-offline">{{ $message }}</p>
@enderror
<p class="mt-1.5 font-mono text-[11px] leading-relaxed text-ink-4">{{ __('system.domain_help') }}</p>
</div>
{{-- TLS-mode selector --}}
<div class="space-y-3 border-t border-line pt-5">
<p class="text-sm font-medium text-ink-2">{{ __('system.tls_mode_title') }}</p>
{{-- Segmented control (mirrors the channel selector) --}}
<div role="radiogroup" aria-label="{{ __('system.tls_mode_title') }}" class="flex w-full rounded-md border border-line bg-inset p-1">
<button type="button"
role="radio"
aria-checked="{{ $tlsMode === 'caddy' ? 'true' : 'false' }}"
wire:click="confirmTlsMode('caddy')"
@class([
'inline-flex h-9 flex-1 items-center justify-center gap-1.5 rounded font-mono text-xs uppercase tracking-wider transition-colors',
'bg-accent/15 text-accent-text shadow-[inset_0_0_0_1px_var(--color-accent)]' => $tlsMode === 'caddy',
'text-ink-3 hover:bg-raised hover:text-ink-2' => $tlsMode !== 'caddy',
])>
@if ($tlsMode === 'caddy')<x-icon name="shield" class="h-3.5 w-3.5" />@endif{{ __('system.tls_mode_caddy') }}
</button>
<button type="button"
role="radio"
aria-checked="{{ $tlsMode === 'external' ? 'true' : 'false' }}"
wire:click="confirmTlsMode('external')"
@class([
'inline-flex h-9 flex-1 items-center justify-center gap-1.5 rounded font-mono text-xs uppercase tracking-wider transition-colors',
'bg-accent/15 text-accent-text shadow-[inset_0_0_0_1px_var(--color-accent)]' => $tlsMode === 'external',
'text-ink-3 hover:bg-raised hover:text-ink-2' => $tlsMode !== 'external',
])>
@if ($tlsMode === 'external')<x-icon name="shield" class="h-3.5 w-3.5" />@endif{{ __('system.tls_mode_external') }}
</button>
</div>
{{-- Per-mode description --}}
<div class="flex items-start gap-3 rounded-md border border-line bg-raised/40 p-3">
<x-icon name="shield" class="mt-0.5 h-4 w-4 shrink-0 text-accent-text" />
<div class="min-w-0">
<p class="text-sm text-ink">
@if ($tlsMode === 'caddy')
{{ __('system.tls_mode_caddy_desc') }}
@else
{{ __('system.tls_mode_external_desc') }}
@endif
</p>
</div>
</div>
{{-- External-proxy hint (warning tone) --}}
@if ($tlsMode === 'external')
<div class="flex items-start gap-3 rounded-md border border-warning/25 bg-warning/10 p-3">
<x-icon name="alert" class="mt-0.5 h-4 w-4 shrink-0 text-warning" />
<p class="font-mono text-[11px] leading-relaxed text-ink-2">{{ __('system.tls_external_hint') }}</p>
</div> </div>
@endif @endif
<p class="mt-2 font-mono text-[11px] leading-relaxed text-ink-4">{{ __('system.restart_watcher_hint') }}</p>
<p class="mt-2 font-mono text-[11px] leading-relaxed text-ink-4">{{ __('system.restart_lockout_hint') }}</p>
</div> </div>
</div> </div>
@endif </x-panel>
{{-- Editable panel domain. Saving persists it and asks for a restart; on restart {{-- RIGHT / side column "KNOW / RECOVER" ──────────────────────────── --}}
app URL, the Reverb endpoint, Caddy's cert and the secure cookie re-derive from it. --}} <x-panel :title="__('system.section_status')" class="lg:col-span-1">
<div class="space-y-3"> <div class="space-y-4">
<div> {{-- Current access address (read-only status) --}}
<label for="domainInput" class="mb-1 block text-sm text-ink-2">{{ __('system.domain') }}</label> <div class="rounded-md border border-line bg-inset/60 p-3">
<div class="flex flex-col gap-2 sm:flex-row"> <p class="font-mono text-[11px] uppercase tracking-wider text-ink-4">{{ __('system.access_address') }}</p>
<input wire:model="domainInput" id="domainInput" type="text" autocomplete="off" <p class="mt-1 min-w-0 break-all font-mono text-sm text-ink">
autocapitalize="off" spellcheck="false"
placeholder="{{ __('system.domain_placeholder') }}"
class="h-9 w-full rounded-md border border-line bg-inset px-3 font-mono text-sm text-ink placeholder:text-ink-4 focus:border-accent/40 focus:outline-none" />
<x-btn variant="secondary" wire:click="confirmDomain" wire:loading.attr="disabled" class="shrink-0">
<x-icon name="save" class="h-3.5 w-3.5" /> {{ __('common.save') }}
</x-btn>
</div>
@error('domainInput')
<p class="mt-1.5 font-mono text-[11px] text-offline">{{ $message }}</p>
@enderror
<p class="mt-1.5 font-mono text-[11px] leading-relaxed text-ink-4">{{ __('system.domain_help') }}</p>
</div>
{{-- Current access address (read-only status) --}}
<dl class="divide-y divide-line overflow-hidden rounded-md border border-line">
<div class="flex items-center justify-between gap-3 px-4 py-2.5">
<dt class="shrink-0 text-sm text-ink-2">{{ __('system.access_address') }}</dt>
<dd class="min-w-0 truncate font-mono text-sm text-ink">
@if ($panelUrl) @if ($panelUrl)
<a href="{{ $panelUrl }}" class="text-accent-text hover:underline">{{ $panelUrl }}</a> <a href="{{ $panelUrl }}" class="text-accent-text hover:underline">{{ $panelUrl }}</a>
@else @else
{{ __('system.access_bare_ip') }} {{ __('system.access_bare_ip') }}
@endif @endif
</dd>
</div>
</dl>
</div>
{{-- TLS-mode selector --}}
<div class="mt-5 space-y-3">
<p class="text-sm font-medium text-ink-2">{{ __('system.tls_mode_title') }}</p>
{{-- Segmented control (mirrors the channel selector) --}}
<div role="radiogroup" aria-label="{{ __('system.tls_mode_title') }}" class="inline-flex w-full max-w-md rounded-md border border-line bg-inset p-1">
<button type="button"
role="radio"
aria-checked="{{ $tlsMode === 'caddy' ? 'true' : 'false' }}"
wire:click="confirmTlsMode('caddy')"
@class([
'inline-flex h-9 flex-1 items-center justify-center gap-1.5 rounded font-mono text-xs uppercase tracking-wider transition-colors',
'bg-accent/15 text-accent-text shadow-[inset_0_0_0_1px_var(--color-accent)]' => $tlsMode === 'caddy',
'text-ink-3 hover:bg-raised hover:text-ink-2' => $tlsMode !== 'caddy',
])>
@if ($tlsMode === 'caddy')<x-icon name="shield" class="h-3.5 w-3.5" />@endif{{ __('system.tls_mode_caddy') }}
</button>
<button type="button"
role="radio"
aria-checked="{{ $tlsMode === 'external' ? 'true' : 'false' }}"
wire:click="confirmTlsMode('external')"
@class([
'inline-flex h-9 flex-1 items-center justify-center gap-1.5 rounded font-mono text-xs uppercase tracking-wider transition-colors',
'bg-accent/15 text-accent-text shadow-[inset_0_0_0_1px_var(--color-accent)]' => $tlsMode === 'external',
'text-ink-3 hover:bg-raised hover:text-ink-2' => $tlsMode !== 'external',
])>
@if ($tlsMode === 'external')<x-icon name="shield" class="h-3.5 w-3.5" />@endif{{ __('system.tls_mode_external') }}
</button>
</div>
{{-- Per-mode description --}}
<div class="flex items-start gap-3 rounded-md border border-line bg-raised/40 p-3">
<x-icon name="shield" class="mt-0.5 h-4 w-4 shrink-0 text-accent-text" />
<div class="min-w-0">
<p class="text-sm text-ink">
@if ($tlsMode === 'caddy')
{{ __('system.tls_mode_caddy_desc') }}
@else
{{ __('system.tls_mode_external_desc') }}
@endif
</p> </p>
</div> </div>
</div>
{{-- External-proxy hint (warning tone) --}} {{-- Current TLS state --}}
@if ($tlsMode === 'external') @if ($hasTls)
<div class="flex items-start gap-3 rounded-md border border-warning/25 bg-warning/10 p-3"> <div class="flex items-start gap-3 rounded-md border border-online/25 bg-online/5 p-3">
<x-icon name="alert" class="mt-0.5 h-4 w-4 shrink-0 text-warning" /> <x-icon name="shield" class="mt-0.5 h-4 w-4 shrink-0 text-online" />
<p class="font-mono text-[11px] leading-relaxed text-ink-2">{{ __('system.tls_external_hint') }}</p> <div class="min-w-0">
<p class="text-sm text-ink">{{ __('system.tls_active_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] leading-relaxed text-ink-3">{{ __('system.tls_active_body_pre') }}
<a href="{{ $panelUrl }}" class="break-all text-accent-text hover:underline">{{ $panelUrl }}</a> ·
{{ __('system.tls_active_body_post') }}</p>
</div>
</div>
@else
<div class="flex items-start gap-3 rounded-md border border-warning/25 bg-warning/5 p-3">
<x-icon name="alert" class="mt-0.5 h-4 w-4 shrink-0 text-warning" />
<div class="min-w-0">
<p class="text-sm text-ink">{{ __('system.tls_bare_title') }}</p>
<p class="mt-0.5 font-mono text-[11px] leading-relaxed text-ink-3">{{ __('system.tls_bare_body') }}</p>
</div>
</div>
@endif
{{-- Last-resort recovery: SSH into the host and reset admin access. --}}
<div class="flex items-start gap-2.5 border-t border-line pt-4 text-ink-4">
<x-icon name="shield" class="mt-0.5 h-4 w-4 shrink-0" />
<p class="font-mono text-[11px] leading-relaxed">{{ __('system.ssh_reset_hint') }}</p>
</div> </div>
@endif </div>
</div> </x-panel>
</x-panel> </div>
{{-- Release-Kanal --}} {{-- ── Release-Kanal (full-width band, below the grid) ──────────────────── --}}
<x-panel :title="__('system.channel_title')" :subtitle="__('system.channel_subtitle')"> <x-panel :title="__('system.channel_title')" :subtitle="__('system.channel_subtitle')">
<div class="space-y-4"> <div class="space-y-4">
{{-- Segmented control --}} {{-- Segmented control --}}