- Updated button components across various views to utilize the new Proxmox UI button structure. - Replaced instances of <x-button.primary> and <x-button.secondary> with <x-proxmox::ui.button> for consistency and improved styling. - Adjusted button attributes and loading states to align with the new component design. - Ensured that all button functionalities remain intact while enhancing the overall UI consistency.
41 lines
2.2 KiB
PHP
41 lines
2.2 KiB
PHP
<div class="" wire:poll.10s="pollEligibility">
|
|
<x-proxmox::ui.button
|
|
wire:click="$set('visible', true)"
|
|
:disabled="!$this->canCreateBackup"
|
|
class="disabled:cursor-not-allowed" variant="primary">
|
|
<x-ri-add-circle-fill class="size-4" />
|
|
Create Backup
|
|
</x-proxmox::ui.button>
|
|
@if($visible)
|
|
<x-modal id="backup" title="Backup Server" open>
|
|
<div class="flex flex-col gap-4">
|
|
<x-form.input label="Backup Name" wire:model="name" placeholder="Enter backup name" name="name" required />
|
|
|
|
<x-form.select label="Backup Type" wire:model="type" placeholder="Select backup type" name="type">
|
|
<option value="snapshot">Snapshot (Takes a snapshot of the current state of the VM)</option>
|
|
<option value="suspend">Suspend (Suspends the VM and takes a backup of the suspended state)</option>
|
|
<option value="stop">Stop (Stops the VM and takes a backup of the stopped state)</option>
|
|
</x-form.select>
|
|
|
|
<x-form.select label="Compression" wire:model="compression" placeholder="Select compression type" name="compression">
|
|
<option value="zstd">ZSTD</option>
|
|
<option value="gzip">Gzip</option>
|
|
<option value="lzo">LZO</option>
|
|
<option value="none">None</option>
|
|
</x-form.select>
|
|
</div>
|
|
|
|
<div class="flex flex-row gap-4 mt-4">
|
|
<x-proxmox::ui.button wire:click="$set('visible', false)" variant="secondary">Cancel</x-proxmox::ui.button>
|
|
<x-proxmox::ui.button wire:click="backup" wire:loading.attr="disabled" wire:loading.class="opacity-50" wire:loading.attr="aria-busy" wire:target="backup"
|
|
:disabled="!$this->canCreateBackup"
|
|
class="disabled:cursor-not-allowed" variant="primary">
|
|
<x-loading target="backup" />
|
|
<div wire:loading.remove wire:target="backup">
|
|
Create backup
|
|
</div>
|
|
</x-proxmox::ui.button>
|
|
</div>
|
|
</x-modal>
|
|
@endif
|
|
</div> |