This commit is contained in:
Andras Bacsai
2023-05-17 12:14:18 +02:00
parent 8e5adb47a0
commit 14d7e9e7f9
11 changed files with 62 additions and 54 deletions

View File

@@ -1,9 +1,12 @@
<form wire:submit.prevent='submit' class="flex items-end gap-2 px-2">
<x-inputs.input noDirty id="name" label="Name" required />
<x-inputs.input noDirty id="mount_path" label="Mount Path (in your app)" required />
<x-inputs.input noDirty id="host_path" label="Mount Path (host)" />
<x-inputs.button type="submit">
Add
</x-inputs.button>
<form wire:submit.prevent='submit' class="flex flex-col px-2 pt-10 max-w-fit">
<div class="flex gap-2">
<x-inputs.input noDirty id="name" label="Name" required />
<x-inputs.input noDirty id="host_path" label="Source Path" />
<x-inputs.input noDirty id="mount_path" label="Destination Path" required />
</div>
<div class="pt-2">
<x-inputs.button isBold type="submit">
Add
</x-inputs.button>
</div>
</form>

View File

@@ -3,8 +3,7 @@
@forelse ($application->persistentStorages as $storage)
<livewire:project.application.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
@empty
<p>There are no persistent storage attached for this application.</p>
<p>There are no persistent storages attached for this application.</p>
@endforelse
<h4>Add new environment variable</h4>
<livewire:project.application.storages.add />
</div>

View File

@@ -1,15 +1,18 @@
<div x-data="{ deleteStorage: false }">
<form wire:submit.prevent='submit' class="flex items-end gap-2 px-2">
<x-inputs.input id="storage.name" label="Name" required />
<x-inputs.input id="storage.mount_path" label="Mount Path (in your app)" required />
<x-inputs.input id="storage.host_path" label="Mount Path (host)" />
<x-inputs.button type="submit">
Update
</x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteStorage = true" isWarning>
Delete
</x-inputs.button>
<form wire:submit.prevent='submit' class="flex flex-col px-2 max-w-fit">
<div class="flex gap-2">
<x-inputs.input id="storage.name" label="Name" required />
<x-inputs.input id="storage.host_path" label="Source Path" />
<x-inputs.input id="storage.mount_path" label="Destination Path" required />
</div>
<div class="pt-2">
<x-inputs.button isBold type="submit">
Update
</x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteStorage = true" isWarning>
Delete
</x-inputs.button>
</div>
</form>
<x-naked-modal show="deleteStorage" message="Are you sure you want to delete {{ $storage->name }}?" />
</div>