mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
优化 StorageCard.vue 组件,简化存储信息显示逻辑,提升代码可读性
This commit is contained in:
@@ -163,13 +163,8 @@ function onClose() {
|
|||||||
<VCardText class="flex justify-space-between align-center gap-3">
|
<VCardText class="flex justify-space-between align-center gap-3">
|
||||||
<div class="align-self-start flex-1">
|
<div class="align-self-start flex-1">
|
||||||
<h5 class="text-h6 mb-1">{{ storage.name }}</h5>
|
<h5 class="text-h6 mb-1">{{ storage.name }}</h5>
|
||||||
<template v-if="storageIconDict[storage.type]">
|
<div class="mb-3 text-sm" v-if="total">{{ formatBytes(used, 1) }} / {{ formatBytes(total, 1) }}</div>
|
||||||
<div class="mb-3 text-sm" v-if="total">{{ formatBytes(used, 1) }} / {{ formatBytes(total, 1) }}</div>
|
<div v-else-if="isNullOrEmptyObject(storage.config)">{{ t('storage.notConfigured') }}</div>
|
||||||
<div v-else-if="isNullOrEmptyObject(storage.config)">{{ t('storage.notConfigured') }}</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div class="mb-3 text-sm">{{ t('storage.custom') }}</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
<VImg :src="getIcon" cover class="mt-7" max-width="3rem" min-width="3rem" />
|
<VImg :src="getIcon" cover class="mt-7" max-width="3rem" min-width="3rem" />
|
||||||
</VCardText>
|
</VCardText>
|
||||||
|
|||||||
Reference in New Issue
Block a user