UI stuffs
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row"">
|
||||
<x-forms.input placeholder="NODE_ENV" noDirty id="key" label="Name" required />
|
||||
<x-forms.input placeholder="production" noDirty id="value" label="Value" required />
|
||||
<x-forms.checkbox class="w-96" noDirty id="is_build_time" label="Build Variable?" />
|
||||
<x-forms.button type="submit">
|
||||
Add New Variable
|
||||
</x-forms.button>
|
||||
</form>
|
||||
<dialog id="newVariable" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<h3 class="text-lg font-bold">Add Environment Variable</h3>
|
||||
<x-forms.input placeholder="NODE_ENV" id="key" label="Name" required />
|
||||
<x-forms.input placeholder="production" id="value" label="Value" required />
|
||||
<x-forms.checkbox id="is_build_time" label="Build Variable?" />
|
||||
<x-forms.button onclick="newVariable.close()" type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</form>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>close</button>
|
||||
</form>
|
||||
</dialog>
|
||||
|
@@ -1,24 +1,26 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<div>
|
||||
<h2>Environment Variables</h2>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Environment Variables</h2>
|
||||
<x-forms.button class="btn" onclick="newVariable.showModal()">+ Add</x-forms.button>
|
||||
<livewire:project.application.environment-variable.add />
|
||||
</div>
|
||||
<div class="">Environment (secrets) variables for normal deployments.</div>
|
||||
</div>
|
||||
@foreach ($application->environment_variables as $env)
|
||||
@forelse ($application->environment_variables as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@endforeach
|
||||
<div class="pt-2 pb-8">
|
||||
<livewire:project.application.environment-variable.add />
|
||||
</div>
|
||||
<div>
|
||||
<h3>Preview Deployments</h3>
|
||||
<div class="">Environment (secrets) variables for Preview Deployments.</div>
|
||||
</div>
|
||||
@foreach ($application->environment_variables_preview as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@endforeach
|
||||
<div class="pt-2 pb-8">
|
||||
<livewire:project.application.environment-variable.add is_preview="true" />
|
||||
</div>
|
||||
@empty
|
||||
<div class="text-neutral-500">No environment variables found.</div>
|
||||
@endforelse
|
||||
@if ($application->environment_variables_preview->count() > 0)
|
||||
<div>
|
||||
<h3>Preview Deployments</h3>
|
||||
<div class="">Environment (secrets) variables for Preview Deployments.</div>
|
||||
</div>
|
||||
@foreach ($application->environment_variables_preview as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
@@ -1,15 +1,19 @@
|
||||
<div x-data="{ deleteEnvironment: false }">
|
||||
<x-naked-modal show="deleteEnvironment" title="Delete Environment"
|
||||
message='This environment will be deleted. It is not reversible. <br>Please think again.' />
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
<x-forms.input id="env.key" label="Name" />
|
||||
<x-forms.input type="password" id="env.value" label="Value" />
|
||||
<x-forms.checkbox class="w-96" disabled id="env.is_build_time" label="Build Variable?" />
|
||||
<div>
|
||||
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Environment Variable">
|
||||
<x-slot:modalBody>
|
||||
<p>Are you sure you want to delete this environment variable <span
|
||||
class="font-bold text-warning">({{ $env->key }})</span>?</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col items-center gap-2 xl:flex-row">
|
||||
<x-forms.input id="env.key" />
|
||||
<x-forms.input type="password" id="env.value" />
|
||||
<x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?" />
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit">
|
||||
Update
|
||||
</x-forms.button>
|
||||
<x-forms.button x-on:click.prevent="deleteEnvironment = true">
|
||||
<x-forms.button isError isModal modalId="{{ $modalId }}">
|
||||
Delete
|
||||
</x-forms.button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user