refactor(environment): streamline rendering of Docker Build Secrets checkbox and adjust layout for environment variable settings

This commit is contained in:
Andras Bacsai
2025-09-19 13:45:37 +02:00
parent f223623603
commit bfaefed1ae
2 changed files with 27 additions and 31 deletions

View File

@@ -28,19 +28,17 @@
@endcan @endcan
</div> </div>
@endif @endif
@if (data_get($resource, 'build_pack') !== 'dockercompose') <div class="w-64">
<div class="w-64"> @can('manageEnvironment', $resource)
@can('manageEnvironment', $resource) <x-forms.checkbox id="use_build_secrets" label="Use Docker Build Secrets"
<x-forms.checkbox id="use_build_secrets" label="Use Docker Build Secrets" helper="Enable Docker BuildKit secrets for enhanced security during builds. Secrets won't be exposed in the final image. Requires Docker 18.09+ with BuildKit support."
helper="Enable Docker BuildKit secrets for enhanced security during builds. Secrets won't be exposed in the final image. Requires Docker 18.09+ with BuildKit support." instantSave></x-forms.checkbox>
instantSave></x-forms.checkbox> @else
@else <x-forms.checkbox id="use_build_secrets" label="Use Docker Build Secrets"
<x-forms.checkbox id="use_build_secrets" label="Use Docker Build Secrets" helper="Enable Docker BuildKit secrets for enhanced security during builds. Secrets won't be exposed in the final image. Requires Docker 18.09+ with BuildKit support."
helper="Enable Docker BuildKit secrets for enhanced security during builds. Secrets won't be exposed in the final image. Requires Docker 18.09+ with BuildKit support." disabled></x-forms.checkbox>
disabled></x-forms.checkbox> @endcan
@endcan </div>
</div>
@endif
</div> </div>
@endif @endif
@if ($resource->type() === 'service' || $resource?->build_pack === 'dockercompose') @if ($resource->type() === 'service' || $resource?->build_pack === 'dockercompose')

View File

@@ -78,22 +78,20 @@
@if ($isSharedVariable) @if ($isSharedVariable)
<x-forms.checkbox instantSave id="is_multiline" label="Is Multiline?" /> <x-forms.checkbox instantSave id="is_multiline" label="Is Multiline?" />
@else @else
@if (!$env->is_coolify) @if (!$env->is_nixpacks)
@if (!$env->is_nixpacks) <x-forms.checkbox instantSave id="is_buildtime"
<x-forms.checkbox instantSave id="is_buildtime" helper="Make this variable available during Docker build process. Useful for build secrets and dependencies."
helper="Make this variable available during Docker build process. Useful for build secrets and dependencies." label="Available at Buildtime" />
label="Available at Buildtime" /> @endif
@endif <x-forms.checkbox instantSave id="is_runtime"
<x-forms.checkbox instantSave id="is_runtime" helper="Make this variable available in the running container at runtime."
helper="Make this variable available in the running container at runtime." label="Available at Runtime" />
label="Available at Runtime" /> @if (!$env->is_nixpacks)
@if (!$env->is_nixpacks) <x-forms.checkbox instantSave id="is_multiline" label="Is Multiline?" />
<x-forms.checkbox instantSave id="is_multiline" label="Is Multiline?" /> @if ($is_multiline === false)
@if ($is_multiline === false) <x-forms.checkbox instantSave id="is_literal"
<x-forms.checkbox instantSave id="is_literal" helper="This means that when you use $VARIABLES in a value, it should be interpreted as the actual characters '$VARIABLES' and not as the value of a variable named VARIABLE.<br><br>Useful if you have $ sign in your value and there are some characters after it, but you would not like to interpolate it from another value. In this case, you should set this to true."
helper="This means that when you use $VARIABLES in a value, it should be interpreted as the actual characters '$VARIABLES' and not as the value of a variable named VARIABLE.<br><br>Useful if you have $ sign in your value and there are some characters after it, but you would not like to interpolate it from another value. In this case, you should set this to true." label="Is Literal?" />
label="Is Literal?" />
@endif
@endif @endif
@endif @endif
@endif @endif
@@ -129,8 +127,8 @@
@if (!$is_redis_credential) @if (!$is_redis_credential)
@if ($type === 'service') @if ($type === 'service')
<x-forms.checkbox disabled id="is_buildtime" <x-forms.checkbox disabled id="is_buildtime"
helper="Make this variable available during Docker build process. Useful for build secrets and dependencies." helper="Make this variable available during Docker build process. Useful for build secrets and dependencies."
label="Available at Buildtime" /> label="Available at Buildtime" />
<x-forms.checkbox disabled id="is_runtime" <x-forms.checkbox disabled id="is_runtime"
helper="Make this variable available in the running container at runtime." helper="Make this variable available in the running container at runtime."
label="Available at Runtime" /> label="Available at Runtime" />