Infrastructure
Forge Domain Row code
Copy the implementation or inspect every file that belongs to this component unit.
resources/views/components/ui/forge-domain-row.blade.php
@props([
'domain',
'primary' => false,
'wildcard' => false,
'redirect' => null,
'certificateStatus' => null,
'certificateVariant' => 'green',
'verification' => null,
'href' => null,
])
@php
/*
| Domain management row for Forge-style site settings. Shows primary domain,
| wildcard, www redirect and certificate verification state.
|
| Usage:
| <x-ui.forge-domain-row domain="example.com" primary certificate-status="Valid" />
*/
@endphp
<div {{ $attributes->merge(['class' => 'flex min-w-0 flex-col gap-3 rounded-xl border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-800 dark:bg-gray-900 lg:flex-row lg:items-center lg:justify-between']) }}>
<div class="min-w-0">
<div class="flex min-w-0 flex-wrap items-center gap-2">
<p class="truncate text-sm font-semibold text-gray-900 dark:text-white">{{ $domain }}</p>
@if ($primary)
<x-ui.badge variant="brand" size="sm">Primary</x-ui.badge>
@endif
@if ($wildcard)
<x-ui.badge variant="blue" size="sm">Wildcard</x-ui.badge>
@endif
</div>
<p class="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-gray-500 dark:text-gray-400">
@if ($redirect)
<span>{{ $redirect }}</span>
@endif
@if ($verification)
<span>{{ $verification }}</span>
@endif
</p>
</div>
<div class="flex shrink-0 flex-wrap items-center gap-2">
@if ($certificateStatus)
<x-ui.badge :variant="$certificateVariant" size="sm" icon="lock-key">{{ $certificateStatus }}</x-ui.badge>
@endif
@if ($href)
<x-ui.button :href="$href" variant="outline" size="sm" icon="gear">Manage</x-ui.button>
@endif
{{ $actions ?? '' }}
</div>
</div>