104 lines
5.3 KiB
PHP
104 lines
5.3 KiB
PHP
<div class="mw-modal-frame">
|
|
|
|
<div class="mw-modal-head">
|
|
<div class="mw-modal-title-wrap">
|
|
<h2 class="mw-modal-title">Domain bearbeiten</h2>
|
|
<span class="mw-modal-sub">DKIM- und DNS-Einträge werden nicht geändert.</span>
|
|
</div>
|
|
<button wire:click="$dispatch('closeModal')" class="mw-modal-close">
|
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M2 2l10 10M12 2L2 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="mw-modal-body">
|
|
|
|
<form wire:submit.prevent="save" id="domain-edit-form">
|
|
|
|
<div class="mw-modal-row">
|
|
<label class="mw-modal-label">Domain</label>
|
|
<input type="text" wire:model="domain" readonly class="mw-modal-input" disabled>
|
|
</div>
|
|
|
|
<div class="mw-modal-row" style="margin-top:12px">
|
|
<label class="mw-modal-label">Beschreibung (optional)</label>
|
|
<textarea wire:model.defer="description" class="mw-modal-input" rows="2"
|
|
style="resize:none;line-height:1.5" placeholder="z. B. Hauptdomain für Kundenmails"></textarea>
|
|
@error('description')<div class="mw-modal-error">{{ $message }}</div>@enderror
|
|
</div>
|
|
|
|
<hr class="mw-modal-sep" style="margin:14px 0">
|
|
|
|
<label class="mw-modal-check">
|
|
<input type="checkbox" wire:model.defer="is_active">
|
|
<span class="mw-modal-check-label">Domain aktiv</span>
|
|
</label>
|
|
|
|
<hr class="mw-modal-sep" style="margin:14px 0">
|
|
|
|
{{-- Tags --}}
|
|
<div>
|
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
|
|
<span class="mw-modal-label" style="margin:0;">Tags (optional)</span>
|
|
<button type="button" wire:click="addTag" class="mw-btn-add-row">
|
|
<svg width="10" height="10" viewBox="0 0 10 10" fill="none"><path d="M5 1v8M1 5h8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
|
Tag
|
|
</button>
|
|
</div>
|
|
|
|
@if(count($tags))
|
|
<div style="display:flex;flex-direction:column;gap:8px;">
|
|
@foreach($tags as $i => $t)
|
|
<div class="mw-modal-recip" wire:key="tag-{{ $i }}" style="display:flex;flex-direction:column;gap:10px;">
|
|
|
|
{{-- Label + Farbe --}}
|
|
<div class="mw-modal-grid2">
|
|
<div class="mw-modal-row">
|
|
<label class="mw-modal-label">Label</label>
|
|
<input type="text" placeholder="z. B. Kunde"
|
|
wire:model.defer="tags.{{ $i }}.label" class="mw-modal-input">
|
|
@error("tags.$i.label")<div class="mw-modal-error">{{ $message }}</div>@enderror
|
|
</div>
|
|
<div class="mw-modal-row">
|
|
<label class="mw-modal-label">Farbe</label>
|
|
<div style="display:flex;gap:6px;align-items:center;">
|
|
<input type="text" placeholder="#22c55e"
|
|
wire:model.lazy="tags.{{ $i }}.color"
|
|
class="mw-modal-input" style="font-family:monospace;min-width:0;">
|
|
<input type="color" value="{{ $t['color'] ?? '#22c55e' }}"
|
|
wire:change="pickTagColor({{ $i }}, $event.target.value)"
|
|
style="width:33px;height:33px;border-radius:6px;border:1px solid var(--mw-b2);background:var(--mw-bg3);padding:2px;cursor:pointer;flex-shrink:0;">
|
|
</div>
|
|
@error("tags.$i.color")<div class="mw-modal-error">{{ $message }}</div>@enderror
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Palette + Löschen --}}
|
|
<div style="display:flex;align-items:center;gap:5px;flex-wrap:wrap;">
|
|
@foreach($tagPalette as $hex)
|
|
<button type="button" wire:click="pickTagColor({{ $i }}, '{{ $hex }}')"
|
|
style="width:17px;height:17px;border-radius:3px;background:{{ $hex }};
|
|
border:2px solid {{ ($t['color'] ?? '') === $hex ? 'var(--mw-t1)' : 'transparent' }};
|
|
cursor:pointer;flex-shrink:0;"></button>
|
|
@endforeach
|
|
<button type="button" wire:click="removeTag({{ $i }})" class="mw-modal-recip-del" style="margin-left:auto;">
|
|
<svg width="12" height="12" viewBox="0 0 13 13" fill="none"><path d="M2 3.5h9M5 3.5V2h3v1.5M5.5 6v4M7.5 6v4M3 3.5l.5 7.5h6L10 3.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="mw-modal-foot">
|
|
<button type="button" wire:click="$dispatch('closeModal')" class="mw-btn-cancel">Abbrechen</button>
|
|
<button type="submit" form="domain-edit-form" class="mw-btn-save">Speichern</button>
|
|
</div>
|
|
|
|
</div>
|