lasthourcloud/resources/views/livewire/project/shared/environment-variable/show.blade.php

75 lines
3.6 KiB
PHP
Raw Normal View History

2023-07-13 11:16:24 +00:00
<div>
2024-03-22 10:34:15 +00:00
<form wire:submit='submit' class="flex flex-col items-center gap-4 p-4 border lg:items-start border-coolgray-300">
2023-10-24 13:41:21 +00:00
@if ($isLocked)
2024-03-22 10:34:15 +00:00
<div class="flex flex-1 w-full gap-2">
2023-10-24 13:41:21 +00:00
<x-forms.input disabled id="env.key" />
2024-03-22 10:34:15 +00:00
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path d="M5 13a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6z" />
<path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0-2 0m-3-5V7a4 4 0 1 1 8 0v4" />
</g>
</svg>
2024-03-20 11:54:06 +00:00
<x-modal-confirmation isErrorButton buttonTitle="Delete">
2024-01-31 15:14:12 +00:00
You will delete environment variable <span
class="font-bold text-warning">{{ $env->key }}</span>.
2024-03-20 11:54:06 +00:00
</x-modal-confirmation>
2024-03-22 10:34:15 +00:00
</div>
@else
@if ($isDisabled)
<div class="flex flex-col w-full gap-2 lg:flex-row">
<x-forms.input disabled id="env.key" />
<x-forms.input disabled type="password" id="env.value" />
@if ($env->is_shared)
<x-forms.input disabled type="password" id="env.real_value" />
@endif
</div>
2023-10-24 13:41:21 +00:00
@else
2024-03-22 10:34:15 +00:00
<div class="flex flex-col w-full gap-2 lg:flex-row">
@if ($env->is_multiline)
<x-forms.input isMultiline="{{ $env->is_multiline }}" id="env.key" />
<x-forms.textarea type="password" id="env.value" />
@else
<x-forms.input id="env.key" />
<x-forms.input type="password" id="env.value" />
@endif
@if ($env->is_shared)
<x-forms.input disabled type="password" id="env.real_value" />
@endif
</div>
@endif
<div class="flex flex-col w-full gap-2 lg:flex-row">
@if ($type !== 'service' && !$isSharedVariable)
<x-forms.checkbox instantSave id="env.is_multiline" label="Is Multiline?" />
<x-forms.checkbox instantSave id="env.is_build_time" label="Build Variable?" />
@endif
<div class="flex-1"></div>
2023-10-24 13:41:21 +00:00
@if ($isDisabled)
<x-forms.button disabled type="submit">
Update
</x-forms.button>
2023-10-26 08:02:45 +00:00
<x-forms.button wire:click='lock'>
Lock
</x-forms.button>
2024-03-20 11:54:06 +00:00
<x-modal-confirmation isErrorButton buttonTitle="Delete">
2024-01-31 15:14:12 +00:00
You will delete environment variable <span
class="font-bold text-warning">{{ $env->key }}</span>.
2024-03-20 11:54:06 +00:00
</x-modal-confirmation>
2023-10-24 13:41:21 +00:00
@else
<x-forms.button type="submit">
Update
</x-forms.button>
<x-forms.button wire:click='lock'>
Lock
</x-forms.button>
2024-03-22 10:34:15 +00:00
<x-modal-confirmation buttonFullWidth isErrorButton buttonTitle="Delete">
2024-01-31 15:14:12 +00:00
You will delete environment variable <span
class="font-bold text-warning">{{ $env->key }}</span>.
2024-03-20 11:54:06 +00:00
</x-modal-confirmation>
2023-10-24 13:41:21 +00:00
@endif
2024-03-22 10:34:15 +00:00
</div>
@endif
2023-05-04 20:29:14 +00:00
</form>
</div>