mailwolt/resources/views/livewire/ui/system/modal/webhook-create-modal.blade.php

70 lines
3.6 KiB
PHP

<div class="mw-modal-frame">
<div class="mw-modal-head">
<div style="display:flex;align-items:center;gap:7px">
<span class="mbx-badge-mute">Webhooks</span>
<span style="font-size:12px;color:var(--mw-t3)"> Neu anlegen</span>
</div>
<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">
<div class="mw-modal-grid2">
<div>
<label class="mw-modal-label">Name</label>
<input type="text" wire:model.defer="name" class="mw-modal-input" placeholder="z.B. Slack Notifier">
@error('name') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div style="display:flex;align-items:flex-end;padding-bottom:2px">
<label class="sec-check">
<input type="checkbox" wire:model.defer="is_active">
<span style="font-size:12.5px;color:var(--mw-t2)">Sofort aktiv</span>
</label>
</div>
</div>
<div style="margin-top:12px">
<label class="mw-modal-label">Endpoint-URL</label>
<input type="url" wire:model.defer="url" class="mw-modal-input" placeholder="https://example.com/webhook">
@error('url') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div style="margin-top:16px">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px">
<label class="mw-modal-label" style="margin:0">Events</label>
<button type="button" wire:click="toggleAll"
style="background:none;border:none;font-size:11px;color:var(--mw-v);cursor:pointer;padding:0">
{{ count($selected) === count($allEvents) ? 'Alle abwählen' : 'Alle wählen' }}
</button>
</div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:12px;background:var(--mw-bg4);border:1px solid var(--mw-b2);border-radius:8px">
@foreach($allEvents as $key => $label)
<label style="display:flex;align-items:center;gap:7px;cursor:pointer">
<input type="checkbox" wire:model="selected" value="{{ $key }}"
style="width:13px;height:13px;accent-color:var(--mw-v)">
<span style="font-size:10.5px;color:var(--mw-t3);font-family:monospace">{{ $key }}</span>
</label>
@endforeach
</div>
@error('selected') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div style="margin-top:12px;padding:10px 12px;background:var(--mw-bg4);border:1px solid var(--mw-b2);border-radius:6px;font-size:11px;color:var(--mw-t4)">
Ein HMAC-SHA256 Secret wird automatisch generiert und kann nach dem Erstellen im Edit-Dialog eingesehen werden.
</div>
</div>
<div class="mw-modal-foot">
<button wire:click="$dispatch('closeModal')" class="mw-btn-cancel">Abbrechen</button>
<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>
Erstellen
</button>
</div>
</div>