diff --git a/UI_REDESIGN.md b/UI_REDESIGN.md index 46b605ebc..bc690cd1c 100644 --- a/UI_REDESIGN.md +++ b/UI_REDESIGN.md @@ -24,6 +24,8 @@ compact divided list, not legacy green check SVGs or fixed-width status rows. > - Build frontend assets in the Vitee container with > `docker exec coolify-vite npm run build`. > - Use existing components before adding another styling abstraction. +> - Use `` for dropdown controls. Never add a native +> ` - - - - - - @else - {{ $redirectLabel }} - @endcan - @endunless
+
+ Domain + DNS + Last checked + +
@foreach ($rows as $row) @php $index = collect($domainRows)->search( @@ -296,6 +268,7 @@ 'application' => $application, 'labelsAreWritable' => $labelsAreWritable, 'isCompose' => false, + 'domainDirection' => $serviceRedirects[$redirectWireKey] ?? 'both', ]) @endforeach
@@ -384,6 +357,24 @@ @enderror + @unless ($labelsAreWritable) +
+ @if ($isCompose) + + @endif + +
+ @endunless + @if ($editDomainDnsFailed) This domain does not currently resolve to this server. diff --git a/resources/views/livewire/project/application/partials/domain-row.blade.php b/resources/views/livewire/project/application/partials/domain-row.blade.php index 6f6446ba0..e217d6bfc 100644 --- a/resources/views/livewire/project/application/partials/domain-row.blade.php +++ b/resources/views/livewire/project/application/partials/domain-row.blade.php @@ -107,6 +107,8 @@ index: {{ $index }}, url: @js($row['url']), service: @js($row['service'] ?? null), + indexing: @js($application->isDomainNoindexed($row['url']) ? 'noindex' : 'index'), + direction: @js($domainDirection ?? $redirect), })" class="icon-button shrink-0" title="Edit domain" aria-label="Edit domain"> diff --git a/resources/views/livewire/project/service/domains.blade.php b/resources/views/livewire/project/service/domains.blade.php index 91d2413ce..d2755b039 100644 --- a/resources/views/livewire/project/service/domains.blade.php +++ b/resources/views/livewire/project/service/domains.blade.php @@ -22,11 +22,15 @@ localEditingIndex: @js($editingIndex), localEditingDomain: @js($editingDomain), localEditingServiceApplicationId: @js($editingServiceApplicationId), - openEditDomain(index, url, serviceApplicationId, serviceLabel) { + localDirection: 'both', + localIndexing: 'index', + openEditDomain(index, url, serviceApplicationId, serviceLabel, direction, indexing) { this.localEditingIndex = index; this.localEditingDomain = url; this.localEditingServiceApplicationId = serviceApplicationId; this.editingServiceLabel = serviceLabel || ''; + this.localDirection = direction || 'both'; + this.localIndexing = indexing || 'index'; this.modalOpen = true; this.$nextTick(() => document.getElementById('editingDomainLocal')?.focus?.()); }, @@ -41,6 +45,8 @@ $wire.editingIndex = this.localEditingIndex; $wire.editingDomain = this.localEditingDomain; $wire.editingServiceApplicationId = this.localEditingServiceApplicationId; + $wire.editingDirection = this.localDirection; + $wire.editingIndexing = this.localIndexing; $wire.showEditDomainModal = true; }, matchesDomainSearch(value) { @@ -50,7 +56,7 @@ return values.some((value) => this.matchesDomainSearch(value)); }, }" - @open-edit-domain.window="openEditDomain($event.detail.index, $event.detail.url, $event.detail.serviceApplicationId, $event.detail.serviceLabel)" + @open-edit-domain.window="openEditDomain($event.detail.index, $event.detail.url, $event.detail.serviceApplicationId, $event.detail.serviceLabel, $event.detail.direction, $event.detail.indexing)" @edit-domain-saved.window="closeEditDomain()"> @can('update', $service) @@ -94,7 +100,9 @@ @endif @can('update', $service) @if ($serviceAppCount > 0) - @include('livewire.project.shared.cloudflare-autoconfigure') +
+ @include('livewire.project.shared.cloudflare-autoconfigure') +
@@ -177,31 +185,12 @@ @php $app = collect($serviceApps)->firstWhere('id', (int) $appId); $heading = \Illuminate\Support\Str::headline($app['name'] ?? $rows->first()['service_name'] ?? 'Service'); - $redirect = $serviceRedirects[$appId] ?? 'both'; - $redirectLabel = match ($redirect) { - 'www' => 'Redirect to www', - 'non-www' => 'Redirect to non-www', - default => 'Allow both', - }; @endphp
-
+
{{ $heading }} - @can('update', $service) -
- -
- @else - {{ $redirectLabel }} - @endcan
@@ -210,7 +199,7 @@ 'domainRows' => $domainRows, 'service' => $service, 'showServiceColumn' => false, - 'showHeader' => false, + 'showHeader' => true, ])
@@ -279,6 +268,20 @@ @enderror +
+ + +
+ @if ($editDomainDnsFailed) This domain does not currently resolve to this server. diff --git a/resources/views/livewire/project/service/partials/domain-table.blade.php b/resources/views/livewire/project/service/partials/domain-table.blade.php index 6f3236b7d..48bd1658e 100644 --- a/resources/views/livewire/project/service/partials/domain-table.blade.php +++ b/resources/views/livewire/project/service/partials/domain-table.blade.php @@ -131,9 +131,11 @@ @click="$dispatch('open-edit-domain', { index: {{ $index }}, url: @js($row['url']), - serviceApplicationId: {{ (int) ($row['service_application_id'] ?? 0) }}, - serviceLabel: @js($serviceLabel), - })" + serviceApplicationId: {{ (int) ($row['service_application_id'] ?? 0) }}, + serviceLabel: @js($serviceLabel), + direction: @js($serviceRedirects[$row['service_application_id']] ?? 'both'), + indexing: @js($service->applications->firstWhere('id', $row['service_application_id'])?->isDomainNoindexed($row['url']) ? 'noindex' : 'index'), + })" class="icon-button shrink-0" title="Edit domain" aria-label="Edit domain"> diff --git a/resources/views/livewire/project/shared/cloudflare-autoconfigure.blade.php b/resources/views/livewire/project/shared/cloudflare-autoconfigure.blade.php index 499ffc54e..43ea25439 100644 --- a/resources/views/livewire/project/shared/cloudflare-autoconfigure.blade.php +++ b/resources/views/livewire/project/shared/cloudflare-autoconfigure.blade.php @@ -8,9 +8,10 @@ x-bind:aria-expanded="dnsEntriesOpen" title="DNS entries for this server"> DNS entries - - - + + +