|
57 | 57 | selectedCount: number |
58 | 58 | /** Disk space info for current volume (null when unavailable) */ |
59 | 59 | volumeSpace?: VolumeSpaceInfo | null |
| 60 | + /** |
| 61 | + * Phone-storage caveat for the disk-space readout, set only on MTP |
| 62 | + * volumes. When present, it tooltips the free/total text to explain why |
| 63 | + * the browsable folders add up to less than the used space. |
| 64 | + */ |
| 65 | + mtpSpaceHint?: string |
60 | 66 | } |
61 | 67 |
|
62 | | - const { viewMode, entry, currentDirModifiedAt, stats, selectedCount, volumeSpace }: Props = $props() |
| 68 | + const { viewMode, entry, currentDirModifiedAt, stats, selectedCount, volumeSpace, mtpSpaceHint }: Props = $props() |
63 | 69 |
|
64 | 70 | // ======================================================================== |
65 | 71 | // Display mode determination |
|
243 | 249 | {#if displayMode === 'empty'} |
244 | 250 | <span class="summary-text">{tString('fileExplorer.selectionInfo.nothingHere')}</span> |
245 | 251 | {#if volumeSpace} |
246 | | - <span class="disk-space-text">{diskSpaceStatusText(volumeSpace)}</span> |
| 252 | + <span class="disk-space-text" use:tooltip={mtpSpaceHint ?? ''}>{diskSpaceStatusText(volumeSpace)}</span> |
247 | 253 | {/if} |
248 | 254 | {:else if displayMode === 'file-info' && entry} |
249 | 255 | <!-- Brief mode without selection: show file info --> |
|
297 | 303 | {#if datePlaceholder !== null}{datePlaceholder}{:else}<DateLabel modifiedAt={dateTimestamp} />{/if} |
298 | 304 | </span> |
299 | 305 | {#if volumeSpace} |
300 | | - <span class="disk-space-text">{diskSpaceStatusText(volumeSpace)}</span> |
| 306 | + <span class="disk-space-text" use:tooltip={mtpSpaceHint ?? ''}>{diskSpaceStatusText(volumeSpace)}</span> |
301 | 307 | {/if} |
302 | 308 | {:else if displayMode === 'no-selection'} |
303 | 309 | <!-- Full mode without selection: show totals --> |
304 | 310 | <span class="summary-text">{noSelectionText}</span> |
305 | 311 | {#if volumeSpace} |
306 | | - <span class="disk-space-text">{diskSpaceStatusText(volumeSpace)}</span> |
| 312 | + <span class="disk-space-text" use:tooltip={mtpSpaceHint ?? ''}>{diskSpaceStatusText(volumeSpace)}</span> |
307 | 313 | {/if} |
308 | 314 | {:else if displayMode === 'selection-summary' && stats} |
309 | 315 | <!-- Selection summary --> |
|
0 commit comments