Refactor button components to use Proxmox UI library
- 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.
This commit is contained in:
@@ -108,16 +108,17 @@
|
||||
}
|
||||
}">
|
||||
@if($isProtected)
|
||||
<x-button.danger
|
||||
<x-proxmox::ui.button
|
||||
@click="open = true"
|
||||
variant="danger"
|
||||
disabled
|
||||
title="Reinstall is disabled: This server is protected in Proxmox">
|
||||
Reinstall
|
||||
</x-button.danger>
|
||||
</x-proxmox::ui.button>
|
||||
@else
|
||||
<x-button.danger @click="open = true">
|
||||
<x-proxmox::ui.button @click="open = true" variant="danger">
|
||||
Reinstall
|
||||
</x-button.danger>
|
||||
</x-proxmox::ui.button>
|
||||
@endif
|
||||
|
||||
<template x-if="open">
|
||||
@@ -231,34 +232,30 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row gap-4 mt-6">
|
||||
<x-button.secondary @click="open = false">Cancel</x-button.secondary>
|
||||
<x-proxmox::ui.button @click="open = false" variant="secondary">
|
||||
Cancel
|
||||
</x-proxmox::ui.button>
|
||||
|
||||
@if($isProtected)
|
||||
<x-button.danger
|
||||
<x-proxmox::ui.button
|
||||
wire:click="reinstall"
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
wire:loading.attr="aria-busy"
|
||||
wire:target="reinstall"
|
||||
variant="danger"
|
||||
disabled
|
||||
title="Reinstall is disabled: This server is protected in Proxmox"
|
||||
>
|
||||
<x-loading target="reinstall" />
|
||||
<div wire:loading.remove wire:target="reinstall">Reinstall</div>
|
||||
</x-button.danger>
|
||||
title="Reinstall is disabled: This server is protected in Proxmox">
|
||||
<span wire:loading.remove wire:target="reinstall">Reinstall</span>
|
||||
<span wire:loading wire:target="reinstall">Reinstalling...</span>
|
||||
</x-proxmox::ui.button>
|
||||
@else
|
||||
<x-button.danger
|
||||
<x-proxmox::ui.button
|
||||
wire:click="reinstall"
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
wire:loading.attr="aria-busy"
|
||||
wire:target="reinstall"
|
||||
variant="danger"
|
||||
:disabled="!$os || !$confirmReinstall"
|
||||
:title="!$os ? 'Please select an operating system' : (!$confirmReinstall ? 'Please confirm the reinstallation' : 'Reinstall server')"
|
||||
>
|
||||
<x-loading target="reinstall" />
|
||||
<div wire:loading.remove wire:target="reinstall">Reinstall</div>
|
||||
</x-button.danger>
|
||||
:title="!$os ? 'Please select an operating system' : (!$confirmReinstall ? 'Please confirm the reinstallation' : 'Reinstall server')">
|
||||
<span wire:loading.remove wire:target="reinstall">Reinstall</span>
|
||||
<span wire:loading wire:target="reinstall">Reinstalling...</span>
|
||||
</x-proxmox::ui.button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user