|
91 | 91 |
|
92 | 92 | <button |
93 | 93 | type="button" |
94 | | - class="flex items-stretch gap-3 p-4 bg-surface-secondary border border-border-primary rounded-lg cursor-pointer transition-all duration-150 text-left w-full hover:bg-surface-tertiary hover:border-border-focus relative" |
| 94 | + class="relative flex w-full cursor-pointer items-stretch gap-3 rounded-lg border border-border-primary bg-surface-secondary p-4 text-left transition-all duration-150 hover:border-border-focus hover:bg-surface-tertiary" |
95 | 95 | onclick={handleCardClick} |
96 | 96 | oncontextmenu={handleContextMenu} |
97 | 97 | > |
98 | | - <div class="shrink-0 w-16 flex items-center justify-center rounded bg-surface-elevated text-text-secondary"> |
| 98 | + <div |
| 99 | + class="flex w-16 shrink-0 items-center justify-center rounded bg-surface-elevated text-text-secondary" |
| 100 | + > |
99 | 101 | <HardDrive size={24} /> |
100 | 102 | </div> |
101 | 103 |
|
102 | | - <div class="flex-1 min-w-0 flex flex-col gap-1 py-0.5"> |
| 104 | + <div class="flex min-w-0 flex-1 flex-col gap-1 py-0.5"> |
103 | 105 | {#if renaming} |
104 | | - <InlineRename |
105 | | - value={displayName} |
106 | | - onSave={handleSaveRename} |
107 | | - onCancel={handleCancelRename} |
108 | | - /> |
| 106 | + <InlineRename value={displayName} onSave={handleSaveRename} onCancel={handleCancelRename} /> |
109 | 107 | {:else} |
110 | | - <div class="flex items-center justify-between gap-2 h-5"> |
111 | | - <span class="text-sm font-medium text-text-primary">{displayName}</span> |
112 | | - <Badge variant="default">{totalFormatted}</Badge> |
| 108 | + <div class="grid h-5 grid-cols-[minmax(0,1fr)_5.25rem] items-center gap-2"> |
| 109 | + <span class="min-w-0 truncate text-sm font-medium text-text-primary" title={displayName}> |
| 110 | + {displayName} |
| 111 | + </span> |
| 112 | + <div class="flex w-[5.25rem] shrink-0 justify-end overflow-hidden"> |
| 113 | + <Badge variant="default">{totalFormatted}</Badge> |
| 114 | + </div> |
113 | 115 | </div> |
114 | 116 | {/if} |
115 | 117 | <div class="text-xs text-text-muted"> |
116 | 118 | {usedFormatted} used · {freeFormatted} free |
117 | 119 | {#if drive.readOnly} |
118 | | - <span class="text-warning ml-1">· Read-only</span> |
| 120 | + <span class="ml-1 text-warning">· Read-only</span> |
119 | 121 | {/if} |
120 | 122 | </div> |
121 | 123 | {#if drive.device} |
122 | | - <div class="text-[10px] text-text-muted font-mono truncate" title="{drive.device} ({drive.fsType || 'unknown'})"> |
123 | | - {drive.device}{#if drive.fsType} · {drive.fsType}{/if} |
| 124 | + <div |
| 125 | + class="truncate font-mono text-[10px] text-text-muted" |
| 126 | + title="{drive.device} ({drive.fsType || 'unknown'})" |
| 127 | + > |
| 128 | + {drive.device}{#if drive.fsType} |
| 129 | + · {drive.fsType}{/if} |
124 | 130 | </div> |
125 | 131 | {/if} |
126 | 132 |
|
127 | 133 | <div class="flex items-center gap-3"> |
128 | 134 | <div class="flex-1"> |
129 | 135 | <ProgressBar value={drive.usedPct} size="sm" variant={progressVariant} /> |
130 | 136 | </div> |
131 | | - <span class="text-[11px] shrink-0 {drive.usedPct >= 90 ? 'text-danger' : drive.usedPct >= 75 ? 'text-warning' : 'text-text-muted'}"> |
| 137 | + <span |
| 138 | + class="shrink-0 text-[11px] {drive.usedPct >= 90 |
| 139 | + ? 'text-danger' |
| 140 | + : drive.usedPct >= 75 |
| 141 | + ? 'text-warning' |
| 142 | + : 'text-text-muted'}" |
| 143 | + > |
132 | 144 | {drive.usedPct.toFixed(1)}% |
133 | 145 | </span> |
134 | 146 | </div> |
|
0 commit comments