clusev/resources/views/livewire/modals/add-ssh-key.blade.php

45 lines
2.2 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">SSH-Schlüssel hinzufügen</h2>
<p class="mt-1 text-sm leading-relaxed text-ink-2">Öffentlichen Schlüssel einfügen er wird in <span class="font-mono text-ink-3">~/.ssh/authorized_keys</span> ergänzt.</p>
</div>
</div>
<div class="mt-4">
<textarea
wire:model="publicKey"
rows="4"
placeholder="ssh-ed25519 AAAA… kommentar"
class="w-full rounded-md border border-line bg-inset px-3 py-2.5 font-mono text-xs text-ink placeholder:text-ink-4 focus:border-accent/40 focus:outline-none"
></textarea>
@if ($error)
<p class="mt-2 flex items-center gap-1.5 font-mono text-[11px] text-offline">
<x-icon name="alert" class="h-3.5 w-3.5 shrink-0" />{{ $error }}
</p>
@endif
</div>
<div class="mt-6 flex items-center justify-end gap-2">
<button
type="button"
wire:click="$dispatch('closeModal')"
class="inline-flex h-9 items-center rounded-md border border-line bg-inset px-3.5 text-sm text-ink-2 transition-colors hover:bg-raised hover:text-ink"
>Abbrechen</button>
<button
type="button"
wire:click="save"
wire:target="save"
wire:loading.attr="disabled"
class="inline-flex h-9 items-center gap-2 rounded-md bg-accent px-3.5 text-sm font-medium text-void transition-colors hover:bg-accent-bright disabled:opacity-60"
>
<x-icon name="plus" class="h-4 w-4" wire:loading.remove wire:target="save" />
<svg wire:loading wire:target="save" class="h-4 w-4 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>
Hinzufügen
</button>
</div>
</div>