82 lines
4.5 KiB
PHP
82 lines
4.5 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)">— Bearbeiten</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">
|
|
@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)">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">
|
|
@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>
|
|
|
|
{{-- Secret --}}
|
|
<div style="margin-top:14px">
|
|
<label class="mw-modal-label">HMAC Secret</label>
|
|
<div style="display:flex;gap:6px;align-items:center">
|
|
<input type="text" value="{{ $secret }}" class="mw-modal-input"
|
|
style="font-family:monospace;font-size:10.5px;opacity:.7;cursor:default" readonly>
|
|
<button wire:click="regenerateSecret"
|
|
wire:confirm="Secret wirklich neu generieren? Bestehende Integrationen müssen aktualisiert werden."
|
|
style="flex-shrink:0;padding:7px 10px;border-radius:7px;background:var(--mw-bg4);border:1px solid var(--mw-b2);color:var(--mw-t3);cursor:pointer;font-size:11px;display:flex;align-items:center;gap:5px;white-space:nowrap">
|
|
<svg width="11" height="11" viewBox="0 0 13 13" fill="none"><path d="M11 2.5A5 5 0 1 0 12 6.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/><path d="M11 2.5V5h-2.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
Neu
|
|
</button>
|
|
</div>
|
|
<div class="mw-modal-hint">Für HMAC-SHA256 Signaturverifikation. Nur einmalig sicher speichern.</div>
|
|
</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 14 14" fill="none"><path d="M2 2h8l2 2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z" stroke="currentColor" stroke-width="1.2"/><path d="M5 2v3h4V2" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>
|
|
Speichern
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|