mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-26 01:10:30 -04:00
feat(env-vars): split production and preview into labelled sections
Preview and production variables were interleaved in one table with a shared Type column. Drop the Type column and head each scope's rows with a 'Production' / 'Preview deployments' section label, so the two groups read as separate sections. Rows already carry their scope and are ordered production-first, so this is presentation-only.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
@php
|
||||
$showEnvironmentType = $showPreview;
|
||||
// Preview and production variables are split into labelled groups instead of a
|
||||
// shared "Type" column, so the column is dropped and rows are headed by scope.
|
||||
$groupByScope = $showPreview;
|
||||
$showEnvironmentType = false;
|
||||
$activeFilterCount = count($variableFilters) + count($serviceFilters) + ($environmentFilter !== 'all' ? 1 : 0);
|
||||
$filterLabels = [
|
||||
'managed' => 'Managed', 'user' => 'User-defined', 'buildtime' => 'Buildtime',
|
||||
@@ -212,7 +215,14 @@
|
||||
<span class="text-center">Runtime</span>
|
||||
<span></span>
|
||||
</div>
|
||||
@php $renderedScope = null; @endphp
|
||||
@foreach ($this->environmentVariablePageRows as $row)
|
||||
@if ($groupByScope && $row['scope'] !== $renderedScope)
|
||||
@php $renderedScope = $row['scope']; @endphp
|
||||
<div class="flex items-center gap-2 border-b border-neutral-200 bg-neutral-50 px-4 py-2 text-[12px] font-semibold text-neutral-700 dark:border-white/[0.08] dark:bg-white/[0.03] dark:text-fg">
|
||||
{{ $renderedScope === 'preview' ? 'Preview deployments' : 'Production' }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($row['kind'] === 'managed')
|
||||
<livewire:project.shared.environment-variable.show wire:key="{{ $row['id'] }}"
|
||||
:env="$row['environmentVariable']" :type="$resource->type()" :showEnvironmentType="$showEnvironmentType" />
|
||||
|
||||
Reference in New Issue
Block a user