mailwolt/resources/views/livewire/ui/domain/domain-dns-list.blade.php

185 lines
11 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="space-y-4">
<div class="">
<div class="md:flex items-center justify-between gap-3">
<h1 class="text-5xl #mb-6">Domains</h1>
</div>
<div class="my-4 md:flex items-center justify-end gap-3">
<input
type="text"
wire:model.live.debounce.300ms="search"
class="md:max-w-96 w-full justify-end flex-1 rounded-xl bg-white/5 border border-white/10 px-4 py-2.5 text-white/90 placeholder:text-white/50"
placeholder="Suchen (Alias) …">
</div>
</div>
{{-- Titel wie in Security --}}
{{-- ================= System-Domain ================= --}}
<div class="glass-card p-5 space-y-3">
<p class="text-sm text-white/70">
Diese Domain wird für <span class="text-white/90 font-medium">interne System-E-Mails</span>
genutzt (Ausfälle, Quota-Warnungen, Zustellfehler). Ist keine echte Domain gesetzt, verwenden
wir ein self-signed Zertifikat und lokales Zustellen. Für produktiven Versand muss die
System-Domain <span class="text-white/90 font-medium">auf diese Server-IP zeigen</span>
und per ACME/Lets Encrypt ein Zertifikat erhalten.
</p>
@if($systemDomain)
<div class="rounded-xl border border-white/10 bg-white/[0.04] px-3 py-3">
<div class="grid grid-cols-1 md:grid-cols-4 items-center gap-3">
<div class=" flex items-center gap-1 text-white/90 font-medium truncate">
<span class="relative flex size-2.5 mx-1">
@if($systemDomain->is_active)
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-300 opacity-60"></span>
<span class="relative inline-flex size-2.5 rounded-full bg-emerald-300 ring-2 ring-emerald-300/30"></span>
@else
<span class="relative inline-flex size-2.5 rounded-full bg-amber-400/90 ring-2 ring-amber-200/20"></span>
@endif
</span>
{{ $systemDomain->domain }}
</div>
<div class="flex items-center gap-2">
{{-- <span class="px-2 py-0.5 rounded-full text-xs border--}}
{{-- {{ $systemDomain->is_active ? 'border-emerald-400/30 text-emerald-300 bg-emerald-500/10'--}}
{{-- : 'border-white/15 text-white/60 bg-white/5' }}">--}}
{{-- {{ $systemDomain->is_active ? 'Aktiv' : 'Inaktiv' }}--}}
{{-- </span>--}}
<span class="px-2 py-0.5 rounded-full text-xs border border-white/15 text-white/70 bg-white/5">
System
</span>
</div>
<div class="md:col-span-2 md:text-right">
<button
class="inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 text-xs text-white/80 hover:text-white hover:border-white/20"
wire:click="openDnsModal({{ $systemDomain->id }})">
<i class="ph ph-globe-hemisphere-east text-[12px]"></i> DNS-Assistent
</button>
</div>
</div>
</div>
@else
<div class="rounded-xl border border-white/10 bg-white/[0.04] px-3 py-3 text-white/75">
Keine System-Domain gefunden. Bitte im Setup anlegen.
</div>
@endif
</div>
{{-- ================= Benutzer-Domains ================= --}}
<div class="glass-card p-5 space-y-3">
<div class="flex items-center justify-between">
<div class="inline-flex items-center gap-2 rounded-full bg-white/5 border border-white/10 px-2.5 py-1">
<i class="ph ph-globe-hemisphere-west text-white/70 text-[13px]"></i>
<span class="text-[11px] uppercase tracking-wide text-white/70">Benutzer-Domains</span>
</div>
<button
class="inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 text-xs text-white/80 hover:text-white hover:border-white/20"
{{-- class="inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white/5 px-3 py-1.5 text-white/80 hover:text-white hover:border-white/20"--}}
onclick="Livewire.dispatch('openModal',{component:'ui.domain.modal.domain-create-modal'})">
<i class="ph ph-plus text-[14px]"></i> Domain hinzufügen
</button>
</div>
@if($userDomains->count())
<div class="space-y-3">
@foreach($userDomains as $d)
<div class="rounded-xl border border-white/10 bg-white/[0.04] p-3">
<div class="grid grid-cols-1 md:grid-cols-3 col-start-1 col-end-3 items-center gap-3">
{{-- Domain + Tags --}}
<div class="text-white/90 font-medium truncate">
<span class="inline-flex items-center gap-2" aria-live="polite">
<span class="relative flex size-2.5 mx-1">
@if($d->domainActive)
<span
class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-300 opacity-60"></span>
<span
class="relative inline-flex size-2.5 rounded-full bg-emerald-300 ring-2 ring-emerald-300/30"></span>
@else
<span
class="relative inline-flex size-2.5 rounded-full bg-amber-400/90 ring-2 ring-amber-200/20"></span>
@endif
</span>
</span>
{{ $d->domain }}
<div class="mt-1 flex items-center gap-1.5">
{{-- Zähler-Badges --}}
<span
class="px-2 py-0.5 rounded-full text-xs border border-white/15 text-white/70 bg-white/5 whitespace-nowrap">
<i class="ph ph-user-list text-[12px]"></i> {{ $d->mailboxes_count ?? 0 }} Postfächer
</span>
<span
class="px-2 py-0.5 rounded-full text-xs border border-white/15 text-white/70 bg-white/5 whitespace-nowrap">
<i class="ph ph-at text-[12px]"></i> {{ $d->aliases_count ?? 0 }} Aliasse
</span>
</div>
</div>
{{-- Status + Zähler --}}
<div class="flex flex-wrap items-center gap-2 col-span-1">
@if(!empty($d->visible_tags))
<div class="mt-1 flex items-center gap-1.5">
@foreach($d->visible_tags as $t)
<span
class="inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[11px] font-medium"
style="background: {{ $t['bg'] }}; border:1px solid {{ $t['border'] }}; color: {{ $t['color'] }};">
<i class="ph ph-tag text-[12px]"></i>{{ $t['label'] }}
</span>
@endforeach
@if($d->extra_tags > 0)
<span
class="inline-flex items-center px-2 py-0.5 rounded-md text-[11px] font-medium border border-white/10 text-white/70 bg-white/5">
+{{ $d->extra_tags }}
</span>
@endif
</div>
@endif
</div>
<hr class="md:hidden">
{{-- Aktionen --}}
<div class="md:col-span-1 md:text-right space-y-2">
<button
class="inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 text-xs text-white/80 hover:text-white hover:border-white/20"
wire:click="openDnsModal({{ $d->id }})">
<i class="ph ph-globe-hemisphere-east text-[12px]"></i> DNS
</button>
<button
class="inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 text-xs text-white/80 hover:text-white hover:border-white/20"
wire:click="openEditModal({{ $d->id }})">
<i class="ph ph-pencil-simple text-[12px]"></i> Bearbeiten
</button>
<button
class="inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1 text-xs text-white/80 hover:text-white hover:border-white/20"
wire:click="openLimitsModal({{ $d->id }})">
<i class="ph ph-sliders-horizontal text-[12px]"></i> Limits
</button>
<button
class="inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs
bg-rose-500/20 text-rose-200 border border-rose-400/40 hover:bg-rose-500/30 shrink-0"
wire:click="openDeleteModal({{ $d->id }})">
<i class="ph ph-trash-simple text-[12px]"></i> Löschen
</button>
</div>
</div>
</div>
@endforeach
</div>
@else
<div class="rounded-xl border border-white/10 bg-white/[0.04] px-3 py-6 text-white/75 text-center">
Noch keine eigenen Domains hinzugefügt.
</div>
@endif
</div>
</div>