feat: add hex magic env var

This commit is contained in:
Andras Bacsai
2024-11-26 13:01:42 +01:00
parent 12f93dbbae
commit 7f0094ed55
4 changed files with 53 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
<div class="flex items-center gap-2">
<h2>Environment Variables</h2>
<div class="flex flex-col items-center">
<x-modal-input buttonTitle="+ Add" title="New Environment Variable">
<x-modal-input buttonTitle="+ Add" title="New Environment Variable" :closeOutside="false">
<livewire:project.shared.environment-variable.add />
</x-modal-input>
</div>
@@ -38,7 +38,7 @@
<div>Environment (secrets) variables for Production.</div>
</div>
@php
$requiredEmptyVars = $resource->environment_variables->filter(function($env) {
$requiredEmptyVars = $resource->environment_variables->filter(function ($env) {
return $env->is_required && empty($env->value);
});
$otherVars = $resource->environment_variables->diff($requiredEmptyVars);
@@ -62,11 +62,13 @@
@endif
@else
<form wire:submit.prevent='submit' class="flex flex-col gap-2">
<x-forms.textarea rows="10" class="whitespace-pre-wrap" id="variables" wire:model="variables" label="Production Environment Variables"></x-forms.textarea>
<x-forms.textarea rows="10" class="whitespace-pre-wrap" id="variables" wire:model="variables"
label="Production Environment Variables"></x-forms.textarea>
@if ($showPreview)
<x-forms.textarea rows="10" class="whitespace-pre-wrap" label="Preview Deployments Environment Variables"
id="variablesPreview" wire:model="variablesPreview"></x-forms.textarea>
<x-forms.textarea rows="10" class="whitespace-pre-wrap"
label="Preview Deployments Environment Variables" id="variablesPreview"
wire:model="variablesPreview"></x-forms.textarea>
@endif
<x-forms.button type="submit" class="btn btn-primary">Save All Environment Variables</x-forms.button>