This commit is contained in:
Andras Bacsai
2023-05-05 09:28:00 +02:00
parent 23f58b8c13
commit 539f82eb08
9 changed files with 66 additions and 34 deletions

View File

@@ -1,10 +1,10 @@
<form wire:submit.prevent='submit' class="flex gap-2 p-4">
<input type="text" wire:model.defer="key" wire:dirty.class="text-black bg-amber-300" />
<input type="text" wire:model.defer="value" wire:dirty.class="text-black bg-amber-300" />
<form wire:submit.prevent='submit' class="flex gap-2 px-2">
<x-inputs.input noLabel noDirty id="key" required />
<x-inputs.input noLabel noDirty id="value" required />
<div class="flex flex-col">
<div class="flex items-center gap-2">
<input type="checkbox" wire:model.defer="is_build_time" />
<label>Used during build?</label>
<label>Build Variable?</label>
</div>
</div>
<x-inputs.button type="submit">

View File

@@ -0,0 +1,10 @@
<div class="flex flex-col gap-2">
<h3>Environment Variables</h3>
@forelse ($application->environment_variables as $env)
<livewire:project.application.environment-variable.show wire:key="item-{{ $env->id }}" :env="$env" />
@empty
<p>There are no environment variables for this application.</p>
@endforelse
<h4>Add new environment variable</h4>
<livewire:project.application.environment-variable.add />
</div>

View File

@@ -1,11 +1,11 @@
<div x-data="{ deleteEnvironment: false }">
<form wire:submit.prevent='submit' class="flex gap-2 p-4">
<form wire:submit.prevent='submit' class="flex gap-2 px-2">
<input type="text" wire:model.defer="env.key" wire:dirty.class="text-black bg-amber-300" />
<input type="text" wire:model.defer="env.value" wire:dirty.class="text-black bg-amber-300" />
<div class="flex flex-col">
<div class="flex items-center gap-2">
<input type="checkbox" wire:model.defer="env.is_build_time" />
<label>Used during build?</label>
<label wire:dirty.class="text-amber-300" wire:target="env.is_build_time">Build Variable?</label>
</div>
</div>
<x-inputs.button type="submit">