2026-07-15 18:36:23 +00:00
|
|
|
@if ($availableS3Storages->isEmpty())
|
|
|
|
|
<div class="flex flex-col gap-4">
|
|
|
|
|
<h2>S3</h2>
|
|
|
|
|
<div>
|
|
|
|
|
No validated S3 available. Configure one <a class="underline dark:text-white" {{ wireNavigate() }}
|
|
|
|
|
href="{{ route('storage.index') }}">here</a>.
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@else
|
2026-07-15 15:34:22 +00:00
|
|
|
<form wire:submit="save" class="flex flex-col gap-4">
|
|
|
|
|
<div class="flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center">
|
|
|
|
|
<h2>S3</h2>
|
2026-07-19 21:15:55 +00:00
|
|
|
<x-forms.button type="submit" class="w-full sm:w-auto" canGate="update"
|
|
|
|
|
:canResource="$backup">Save</x-forms.button>
|
2026-07-15 15:34:22 +00:00
|
|
|
@if (!$saveToS3)
|
|
|
|
|
<x-forms.button type="button" wire:click="toggleS3" wire:loading.attr="disabled"
|
2026-07-19 21:15:55 +00:00
|
|
|
wire:target="toggleS3" isHighlighted canGate="update" :canResource="$backup">Enable S3</x-forms.button>
|
2026-07-15 15:34:22 +00:00
|
|
|
@else
|
|
|
|
|
<x-forms.button type="button" wire:click="toggleS3" wire:loading.attr="disabled"
|
2026-07-19 21:15:55 +00:00
|
|
|
wire:target="toggleS3" canGate="update" :canResource="$backup">Disable S3</x-forms.button>
|
2026-07-15 15:34:22 +00:00
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="w-full max-w-md pb-2">
|
|
|
|
|
<div class="flex items-center gap-1 mb-1 text-sm font-medium">
|
|
|
|
|
<span>S3 Storage</span>
|
|
|
|
|
@if (!$saveToS3)
|
|
|
|
|
<span class="text-xs font-normal text-warning">(currently disabled)</span>
|
|
|
|
|
@else
|
|
|
|
|
<x-highlighted text="*" />
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
2026-07-19 21:15:55 +00:00
|
|
|
<x-forms.select id="s3StorageId" wire:model.live="s3StorageId" :required="$saveToS3" canGate="update"
|
|
|
|
|
:canResource="$backup">
|
2026-07-15 18:36:23 +00:00
|
|
|
@foreach ($availableS3Storages as $s3Storage)
|
|
|
|
|
<option value="{{ $s3Storage->id }}">{{ $s3Storage->name }}</option>
|
|
|
|
|
@endforeach
|
2026-07-15 15:34:22 +00:00
|
|
|
</x-forms.select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="w-full max-w-md">
|
|
|
|
|
@if ($saveToS3)
|
|
|
|
|
<x-forms.checkbox instantSave id="disableLocalBackup" label="Disable Local Backup"
|
2026-07-19 21:15:55 +00:00
|
|
|
helper="When enabled, backup files are deleted locally after a successful S3 upload." canGate="update"
|
|
|
|
|
:canResource="$backup" />
|
2026-07-15 15:34:22 +00:00
|
|
|
@else
|
|
|
|
|
<x-forms.checkbox id="disableLocalBackup" label="Disable Local Backup"
|
2026-07-19 21:15:55 +00:00
|
|
|
helper="When enabled, backup files are deleted locally after a successful S3 upload." disabled
|
|
|
|
|
canGate="update" :canResource="$backup" />
|
2026-07-15 15:34:22 +00:00
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</form>
|
2026-07-15 18:36:23 +00:00
|
|
|
@endif
|