mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-08-12 17:14:37 +08:00
fix(download): keep torrent size visible
This commit is contained in:
@@ -187,7 +187,7 @@ async function deleteDownload() {
|
||||
<VChip v-if="sourceSiteText" prepend-icon="mdi-web" size="x-small" variant="tonal">
|
||||
{{ sourceSiteText }}
|
||||
</VChip>
|
||||
<VChip v-else prepend-icon="mdi-harddisk" size="x-small" variant="tonal">
|
||||
<VChip class="downloading-card__size-chip" prepend-icon="mdi-harddisk" size="x-small" variant="tonal">
|
||||
{{ sizeText }}
|
||||
</VChip>
|
||||
</div>
|
||||
@@ -328,9 +328,18 @@ async function deleteDownload() {
|
||||
}
|
||||
|
||||
.downloading-card__chips :deep(.v-chip) {
|
||||
min-inline-size: 0;
|
||||
max-inline-size: calc(50% - 0.2rem);
|
||||
}
|
||||
|
||||
.downloading-card__chips :deep(.v-chip:not(.downloading-card__size-chip)) {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.downloading-card__chips :deep(.downloading-card__size-chip) {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.downloading-card__chips :deep(.v-chip__content) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -140,10 +140,12 @@ describe('DownloadingCard display and pause state', () => {
|
||||
expect(container.querySelectorAll('.downloading-card__chips .v-chip')).toHaveLength(1)
|
||||
})
|
||||
|
||||
it('prefers explicit site names and safely reduces tracker URLs to hostnames', async () => {
|
||||
it('keeps torrent size visible while resolving explicit site names and tracker hostnames', async () => {
|
||||
const { container, rerender } = await renderCard(downloading({ site_name: ' M-Team ' }))
|
||||
|
||||
expect(container.querySelector('.downloading-card__chips')).toHaveTextContent('M-Team')
|
||||
expect(container.querySelector('.downloading-card__chips')).toHaveTextContent('1.00 KB')
|
||||
expect(container.querySelectorAll('.downloading-card__chips .v-chip')).toHaveLength(3)
|
||||
|
||||
await rerender({
|
||||
downloaderName: 'qb-main',
|
||||
|
||||
Reference in New Issue
Block a user