61 lines
2.9 KiB
PHP
61 lines
2.9 KiB
PHP
<div class="p-5 sm:p-6">
|
|
<div class="flex items-start gap-3.5">
|
|
<span class="grid h-10 w-10 shrink-0 place-items-center rounded-md border border-accent/30 bg-accent/10 text-accent-text">
|
|
<x-icon name="shield" class="h-5 w-5" />
|
|
</span>
|
|
<div class="min-w-0 flex-1">
|
|
<h2 class="font-display text-base font-semibold text-ink">{{ $heading ?: 'Härtung anwenden' }}</h2>
|
|
@if ($description)
|
|
<p class="mt-1 text-sm leading-relaxed text-ink-2">{{ $description }}</p>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
@if ($error)
|
|
<div class="mt-4 flex items-center gap-2.5 rounded-md border border-offline/25 bg-offline/10 px-3.5 py-3">
|
|
<x-icon name="alert" class="h-4 w-4 shrink-0 text-offline" />
|
|
<p class="text-sm text-ink-2">{{ $error }}</p>
|
|
</div>
|
|
@else
|
|
<div class="mt-4">
|
|
<p class="mb-1 block font-mono text-[11px] uppercase tracking-wider text-ink-3">Befehle (als root)</p>
|
|
<pre class="overflow-x-auto rounded-md border border-line bg-void px-3.5 py-3 font-mono text-[11px] leading-relaxed text-ink-2">{{ $preview }}</pre>
|
|
</div>
|
|
|
|
@if ($done)
|
|
<div @class([
|
|
'mt-3 rounded-md border px-3.5 py-3',
|
|
'border-online/25 bg-online/10' => $ok,
|
|
'border-offline/25 bg-offline/10' => ! $ok,
|
|
])>
|
|
<p @class([
|
|
'flex items-center gap-1.5 font-mono text-[11px]',
|
|
'text-online' => $ok,
|
|
'text-offline' => ! $ok,
|
|
])>
|
|
<x-icon :name="$ok ? 'activity' : 'alert'" class="h-3.5 w-3.5 shrink-0" />
|
|
{{ $ok ? 'Angewendet' : 'Fehlgeschlagen' }}
|
|
</p>
|
|
@if ($output !== '')
|
|
<pre class="mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed text-ink-3">{{ $output }}</pre>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
@endif
|
|
|
|
<div class="mt-6 flex items-center justify-end gap-2">
|
|
@if ($done)
|
|
<x-btn variant="primary" wire:click="$dispatch('closeModal')">Schließen</x-btn>
|
|
@else
|
|
<x-btn variant="secondary" wire:click="$dispatch('closeModal')">Abbrechen</x-btn>
|
|
@unless ($error)
|
|
<x-btn variant="accent" wire:click="apply" wire:target="apply" wire:loading.attr="disabled">
|
|
<x-icon name="shield" class="h-3.5 w-3.5" wire:loading.remove wire:target="apply" />
|
|
<svg wire:loading wire:target="apply" class="h-3.5 w-3.5 animate-spin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true"><path d="M21 12a9 9 0 1 1-6.219-8.56" stroke-linecap="round" /></svg>
|
|
Anwenden
|
|
</x-btn>
|
|
@endunless
|
|
@endif
|
|
</div>
|
|
</div>
|