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:
2025-12-17 17:40:11 -05:00
parent 6d6ea1a2cc
commit 689f84ab53
13 changed files with 245 additions and 250 deletions

View File

@@ -184,12 +184,12 @@
<p class="text-xs text-gray-500 dark:text-gray-400">Leave blank to retain the template default user.</p>
</div>
<div class="flex justify-end gap-2">
<x-button.secondary type="button" @click="showCiUserModal = false">
<x-proxmox::ui.button type="button" @click="showCiUserModal = false" variant="secondary">
Cancel
</x-button.secondary>
<x-button.primary type="button" @click="showCiUserModal = false">
</x-proxmox::ui.button>
<x-proxmox::ui.button type="button" @click="showCiUserModal = false" variant="primary">
Done
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</div>
@@ -298,15 +298,15 @@
</p>
</div>
<div class="flex justify-end gap-2">
<x-button.secondary type="button" @click="showPasswordEditModal = false; $wire.cancelEditingPassword()">
<x-proxmox::ui.button type="button" @click="showPasswordEditModal = false; $wire.cancelEditingPassword()" variant="secondary">
Cancel
</x-button.secondary>
<x-button.primary type="button" wire:click="updatePassword">
</x-proxmox::ui.button>
<x-proxmox::ui.button type="button" wire:click="updatePassword" variant="primary">
Save
</x-button.primary>
<x-button.primary type="button" wire:click="applyPassword">
</x-proxmox::ui.button>
<x-proxmox::ui.button type="button" wire:click="applyPassword" variant="primary">
Save &amp; Apply
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</div>
@@ -372,9 +372,9 @@
@endforelse
</div>
<div class="flex flex-col gap-2">
<x-button.secondary type="button" @click="showAddKeyModal = true">
<x-proxmox::ui.button type="button" @click="showAddKeyModal = true" variant="secondary">
Add Key
</x-button.secondary>
</x-proxmox::ui.button>
</div>
<p class="text-xs text-gray-500 dark:text-gray-400">Add as many keys as needed. The platform management key is always kept but never shown.</p>
@@ -398,14 +398,14 @@
placeholder="ssh-ed25519 AAAA... user@host"></textarea>
</div>
<div class="flex justify-end gap-2">
<x-button.secondary type="button" @click="showAddKeyModal = false">
<x-proxmox::ui.button type="button" @click="showAddKeyModal = false" variant="secondary">
Cancel
</x-button.secondary>
<x-button.primary type="button"
</x-proxmox::ui.button>
<x-proxmox::ui.button type="button"
wire:click="addSshKey"
@click="showAddKeyModal = false">
@click="showAddKeyModal = false" variant="primary">
Add Key
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</div>
@@ -566,12 +566,12 @@
Leave fields blank to remove static addressing. If both IPv4 fields are empty, cloud-init omits the IPv4 stanza.
</p>
<div class="flex justify-end gap-2">
<x-button.secondary wire:click="cancelEditingNetwork" @click="showNetworkModal = false">
<x-proxmox::ui.button wire:click="cancelEditingNetwork" @click="showNetworkModal = false" variant="secondary">
Cancel
</x-button.secondary>
<x-button.primary wire:click="saveNetwork" @click="showNetworkModal = false">
</x-proxmox::ui.button>
<x-proxmox::ui.button wire:click="saveNetwork" @click="showNetworkModal = false" variant="primary">
Save
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</div>
@@ -671,12 +671,12 @@
<p class="text-xs text-gray-500 dark:text-gray-400">Leave blank to use system default. Appended to short hostnames for resolution.</p>
</div>
<div class="flex justify-end gap-2">
<x-button.secondary type="button" @click="showDnsDomainModal = false">
<x-proxmox::ui.button type="button" @click="showDnsDomainModal = false" variant="secondary">
Cancel
</x-button.secondary>
<x-button.primary type="button" @click="showDnsDomainModal = false">
</x-proxmox::ui.button>
<x-proxmox::ui.button type="button" @click="showDnsDomainModal = false" variant="primary">
Done
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</div>
@@ -698,9 +698,9 @@
@endforelse
</div>
<div class="flex flex-col gap-2">
<x-button.secondary type="button" @click="showAddDnsModal = true">
<x-proxmox::ui.button type="button" @click="showAddDnsModal = true" variant="secondary">
Add Nameserver
</x-button.secondary>
</x-proxmox::ui.button>
</div>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Entries are applied in order. Add one IPv4/IPv6 resolver per line.</p>
@@ -787,14 +787,14 @@
</div>
</div>
<div class="flex justify-end gap-2">
<x-button.secondary type="button" @click="showAddDnsModal = false">
<x-proxmox::ui.button type="button" @click="showAddDnsModal = false" variant="secondary">
Cancel
</x-button.secondary>
<x-button.primary type="button"
</x-proxmox::ui.button>
<x-proxmox::ui.button type="button"
wire:click="addDnsServer"
@click="showAddDnsModal = false">
@click="showAddDnsModal = false" variant="primary">
Add Nameserver
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</div>
@@ -874,17 +874,17 @@
</div>
<div class="flex items-center gap-2 overflow-x-auto">
<x-button.secondary wire:click="refreshCloudInit" wire:loading.attr="disabled">
<x-proxmox::ui.button wire:click="refreshCloudInit" wire:loading.attr="disabled" variant="secondary">
<x-loading target="refreshCloudInit" />
Refresh
</x-button.secondary>
<x-button.secondary wire:click="resetCloudInit" :disabled="!$this->hasChanges">
</x-proxmox::ui.button>
<x-proxmox::ui.button wire:click="resetCloudInit" :disabled="!$this->hasChanges" variant="secondary">
Reset
</x-button.secondary>
<x-button.primary wire:click="applyCloudInit" wire:loading.attr="disabled" :disabled="!$this->hasChanges">
</x-proxmox::ui.button>
<x-proxmox::ui.button wire:click="applyCloudInit" wire:loading.attr="disabled" :disabled="!$this->hasChanges" variant="primary">
<x-loading target="applyCloudInit" />
Apply &amp; Regenerate
</x-button.primary>
</x-proxmox::ui.button>
</div>
</div>
</x-proxmox::layout>