优化多个组件的样式和功能:调整 FileBrowser 和 TransferHistoryView 的高度计算,更新 TorrentCard 和 TorrentItem 的 VChip 颜色,修改 FileList、FileNavigator 和 FileToolbar 中 axios 的类型定义,更新主题中的 secondary 颜色,添加动态按钮到 UserListView,移除冗余的用户添加卡片样式。

This commit is contained in:
jxxghp
2025-04-21 20:01:39 +08:00
parent 06f6ab355e
commit 77ec8c7a81
10 changed files with 43 additions and 57 deletions

View File

@@ -181,8 +181,8 @@ function fileListUpdated(items: FileItem[]) {
// 外层DIV大小控制
const scrollStyle = computed(() => {
return appMode
? 'height: calc(100vh - 10rem - env(safe-area-inset-bottom) - 7rem)'
: 'height: calc(100vh - 10rem - env(safe-area-inset-bottom)'
? 'height: calc(100vh - 10.5rem - env(safe-area-inset-bottom) - 6.5rem)'
: 'height: calc(100vh - 10.5rem - env(safe-area-inset-bottom)'
})
// 文件列表大小限制

View File

@@ -252,7 +252,7 @@ onMounted(() => {
<!-- 体积和详情按钮并排 -->
<div class="d-flex align-center">
<VChip v-if="torrent?.size" color="secondary" size="x-small" variant="elevated" class="rounded-sm mr-2">
<VChip v-if="torrent?.size" color="primary" size="x-small" variant="elevated" class="rounded-sm mr-2">
{{ formatFileSize(torrent.size) }}
</VChip>
<VBtn icon size="small" variant="text" color="primary" @click.stop="openTorrentDetail">
@@ -263,9 +263,9 @@ onMounted(() => {
</VCard>
<!-- 更多来源对话框 -->
<VDialog v-model="showMoreTorrents" max-width="380px" location="center">
<VDialog v-model="showMoreTorrents" max-width="25rem" location="center">
<VCard>
<VCardTitle class="py-2 d-flex align-center">
<VCardTitle class="py-3 d-flex align-center">
<span>其他来源</span>
<VSpacer />
<VBtn variant="text" size="small" icon="mdi-close" @click.stop="showMoreTorrents = false"></VBtn>
@@ -273,7 +273,7 @@ onMounted(() => {
<VDivider />
<VCardText class="more-sources-content">
<VCardText class="more-sources-content pa-0">
<VList lines="one" density="compact">
<VListItem
v-for="(item, index) in props.more"
@@ -333,7 +333,7 @@ onMounted(() => {
</span>
<span>
<VIcon
@click.stop="openTorrentDetail(item)"
@click.stop="openTorrentDetail"
size="small"
color="secondary"
icon="mdi-arrow-top-right"

View File

@@ -203,7 +203,7 @@ onMounted(() => {
</div>
<div class="d-flex align-center">
<VChip v-if="torrent?.size" color="secondary" size="x-small" variant="elevated" class="rounded-sm mr-2">
<VChip v-if="torrent?.size" color="primary" size="x-small" variant="elevated" class="rounded-sm mr-2">
{{ formatFileSize(torrent.size) }}
</VChip>

View File

@@ -20,7 +20,7 @@ const inProps = defineProps({
storage: String,
endpoints: Object as PropType<EndPoints>,
axios: {
type: Function,
type: Object as PropType<any>,
required: true,
},
refreshpending: Boolean,
@@ -562,7 +562,7 @@ onMounted(() => {
variant="plain"
placeholder="搜索 ..."
prepend-inner-icon="mdi-filter-outline"
class="me-2"
class="mx-2"
rounded
/>
<VSpacer v-if="isFile" />

View File

@@ -23,7 +23,7 @@ const props = defineProps({
},
endpoints: Object,
axios: {
type: Function,
type: Object as PropType<any>,
required: true,
},
})

View File

@@ -20,7 +20,7 @@ const inProps = defineProps({
},
endpoints: Object as PropType<EndPoints>,
axios: {
type: Function,
type: Object as PropType<any>,
required: true,
},
})