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

71 lines
3.6 KiB
PHP

<div class="mw-modal-frame">
<div class="mw-modal-head">
@if($type === 'blacklist')
<div style="display:flex;align-items:center;gap:7px">
<span class="sec-bl-badge">Blacklist</span>
<span style="font-size:12px;color:var(--mw-t3)"> {{ $mode === 'add' ? 'IP hinzufügen' : 'IP entfernen' }}</span>
</div>
@else
<div style="display:flex;align-items:center;gap:7px">
<span class="mbx-badge-mute">Whitelist</span>
<span style="font-size:12px;color:var(--mw-t3)"> {{ $mode === 'add' ? 'IP hinzufügen' : 'IP entfernen' }}</span>
</div>
@endif
<button wire:click="$dispatch('closeModal')" class="mw-modal-close">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none"><path d="M1 1l11 11M12 1L1 12" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg>
</button>
</div>
<div class="mw-modal-body">
@if($mode === 'add')
<div>
<label class="mw-modal-label">IP-Adresse oder CIDR</label>
<input type="text" wire:model.defer="ip" wire:keydown.enter="save"
placeholder="z. B. 203.0.113.4 oder 10.0.0.0/24 oder 2001:db8::/32"
class="mw-modal-input">
@error('ip')
<div class="mw-modal-error">{{ $message }}</div>
@enderror
<div class="mw-modal-hint">IPv4, IPv6 und CIDR-Notation werden unterstützt.</div>
</div>
@if($type === 'blacklist')
<div style="padding:9px 11px;border-radius:8px;border:1px solid rgba(239,68,68,.25);background:rgba(239,68,68,.06);font-size:11.5px;color:rgba(252,165,165,.8)">
Wird sofort im Jail <code style="font-size:10.5px">mailwolt-blacklist</code> permanent gebannt.
</div>
@endif
@else
<div style="padding:10px 12px;border-radius:8px;border:1px solid var(--mw-b2);background:var(--mw-bg4)">
<div style="font-size:12.5px;color:var(--mw-t1);font-family:monospace">{{ $prefill ?? $ip }}</div>
<div style="font-size:11px;color:var(--mw-t4);margin-top:3px">
Wird aus der {{ ucfirst($type) }} entfernt{{ $type === 'blacklist' ? ' und im Blacklist-Jail entbannt' : '' }}.
</div>
</div>
@endif
</div>
<div class="mw-modal-foot">
<button wire:click="$dispatch('closeModal')" class="mw-btn-cancel">Abbrechen</button>
@if($mode === 'add')
@if($type === 'blacklist')
<button wire:click="save" class="mw-btn-del">
<svg width="12" height="12" viewBox="0 0 14 14" fill="none"><path d="M7 1.5L12.5 4v4.8c0 2.8-2.3 4.8-5.5 5.2C3.8 13.6 1.5 11.6 1.5 8.8V4L7 1.5Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/></svg>
Zur Blacklist & sperren
</button>
@else
<button wire:click="save" class="mw-btn-primary">
<svg width="11" height="11" viewBox="0 0 11 11" fill="none"><path d="M5.5 1v9M1 5.5h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
Zur Whitelist hinzufügen
</button>
@endif
@else
<button wire:click="remove" class="mw-btn-del">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M2 2l8 8M10 2l-8 8" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg>
Entfernen
</button>
@endif
</div>
</div>