feat: simplify drive display by removing advanced view conditions
This commit is contained in:
@@ -243,15 +243,7 @@
|
||||
@else
|
||||
<div class="divide-y divide-neutral">
|
||||
@foreach($drives as $driveKey => $drive)
|
||||
<div class="p-4 hover:bg-background/50 transition-colors"
|
||||
x-data="{
|
||||
isAdvancedView: localStorage.getItem('proxmox-view-mode') === 'advanced'
|
||||
}"
|
||||
x-init="
|
||||
window.addEventListener('proxmox-view-mode-changed', (e) => {
|
||||
isAdvancedView = e.detail.isAdvancedView;
|
||||
});
|
||||
">
|
||||
<div class="p-4 hover:bg-background/50 transition-colors">
|
||||
<div class="flex flex-col lg:flex-row lg:items-center justify-between gap-4">
|
||||
<div class="flex items-start gap-4">
|
||||
<div class="flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 flex-shrink-0">
|
||||
@@ -261,45 +253,31 @@
|
||||
<div class="flex items-center gap-2 flex-wrap">
|
||||
<h4 class="font-semibold text-base">{{ $drive['label'] }}</h4>
|
||||
<span class="px-2 py-0.5 text-xs font-medium rounded bg-neutral/30 text-base/70">{{ $driveKey }}</span>
|
||||
<template x-if="isAdvancedView">
|
||||
<span>
|
||||
@if($drive['ssd'])
|
||||
<span class="px-2 py-0.5 text-xs font-medium rounded bg-success/20 text-success">SSD</span>
|
||||
@endif
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="isAdvancedView">
|
||||
<span>
|
||||
@if($drive['iothread'])
|
||||
<span class="px-2 py-0.5 text-xs font-medium rounded bg-info/20 text-info">IO Thread</span>
|
||||
@endif
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-4 gap-y-1 mt-1 text-xs text-base/60">
|
||||
<span>{{ number_format($drive['size'], 1) }} GB</span>
|
||||
<span x-show="isAdvancedView">Cache: {{ ucfirst($drive['cache']) }}</span>
|
||||
<span x-show="isAdvancedView">AIO: {{ $drive['aio'] }}</span>
|
||||
<template x-if="isAdvancedView">
|
||||
<span>
|
||||
<span>Cache: {{ ucfirst($drive['cache']) }}</span>
|
||||
<span>AIO: {{ $drive['aio'] }}</span>
|
||||
@if($drive['discard'])
|
||||
<span class="text-success">Discard enabled</span>
|
||||
@endif
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2 flex-shrink-0">
|
||||
<button wire:click="openEditDriveModal('{{ $driveKey }}')"
|
||||
x-show="isAdvancedView"
|
||||
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-neutral bg-background hover:bg-background-secondary transition-colors">
|
||||
<x-ri-settings-3-line class="size-3.5" />
|
||||
Settings
|
||||
</button>
|
||||
<button wire:click="openMoveDriveModal('{{ $driveKey }}')"
|
||||
x-show="isAdvancedView"
|
||||
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-neutral bg-background hover:bg-background-secondary transition-colors">
|
||||
<x-ri-arrow-left-right-line class="size-3.5" />
|
||||
Move
|
||||
|
||||
Reference in New Issue
Block a user