mailwolt/resources/views/livewire/ui/security/modal/fail2ban-ip-modal.blade.php

56 lines
2.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<div class="p-5">
{{-- Header --}}
<div class="flex items-center justify-between mb-4">
<div class="inline-flex items-center gap-2 rounded-full
{{ $type === 'blacklist' ? 'bg-rose-500/10 border border-rose-400/30' : 'bg-white/5 border border-white/10' }}
px-2.5 py-1">
<i class="ph {{ $type === 'blacklist' ? 'ph-hand text-rose-300' : 'ph-list text-white/70' }} text-[13px]"></i>
<span class="text-[11px] uppercase tracking-wide
{{ $type === 'blacklist' ? 'text-rose-300' : 'text-white/70' }}">
{{ strtoupper($type) }} {{ $mode === 'add' ? 'hinzufügen' : 'entfernen' }}
</span>
</div>
<button type="button" wire:click="$dispatch('closeModal')"
class="rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 text-white/70 hover:text-white">
Schließen
</button>
</div>
{{-- Body --}}
<div class="space-y-3">
@if($mode === 'add')
<div>
<label class="block text-white/60 text-sm mb-1">IP oder CIDR</label>
<input type="text" wire:model.defer="ip" placeholder="z. B. 203.0.113.4 oder 203.0.113.0/24 oder 2001:db8::/32"
class="w-full h-11 rounded-xl border border-white/10 bg-white/[0.04] px-3 text-white/90">
@error('ip') <p class="text-sm text-rose-400 mt-1">{{ $message }}</p> @enderror
</div>
<button wire:click="save"
class="primary-btn w-full justify-center">
{{ $type === 'blacklist' ? 'Zur Blacklist hinzufügen & bannen' : 'Zur Whitelist hinzufügen' }}
</button>
@if($type === 'blacklist')
<p class="text-xs text-white/50 mt-2">
Wird sofort im Jail <code>mailwolt-blacklist</code> gebannt (bantime = permanent).
</p>
@endif
@else
<div class="rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2">
<div class="text-white/80 text-sm">IP: {{ $prefill ?? $ip }}</div>
<div class="text-white/50 text-xs">Wird aus der {{ $type }} entfernt
@if($type === 'blacklist') und im Blacklist-Jail entbannt @endif.
</div>
</div>
<button wire:click="remove"
class="text-[13px] w-full px-3 py-2 rounded-xl border
{{ $type === 'blacklist'
? 'border-rose-400/40 bg-rose-500/10 text-rose-200 hover:border-rose-400/70'
: 'border-white/20 bg-white/5 text-white/80 hover:border-white/40' }}">
Entfernen
</button>
@endif
</div>
</div>