mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 08:06:43 +08:00
refactor: streamline transfer queue logic and improve styling
This commit is contained in:
@@ -190,8 +190,7 @@ async function get_transfer_queue() {
|
|||||||
try {
|
try {
|
||||||
dataList.value = await api.get('transfer/queue')
|
dataList.value = await api.get('transfer/queue')
|
||||||
if (dataList.value.length > 0) {
|
if (dataList.value.length > 0) {
|
||||||
if (!activeTab.value || activeTasks.value.length === 0)
|
if (!activeTab.value || activeTasks.value.length === 0) activeTab.value = dataList.value[0].media.title_year || ''
|
||||||
activeTab.value = dataList.value[0].media.title_year || ''
|
|
||||||
|
|
||||||
if (!progressActive.value) startLoadingProgress()
|
if (!progressActive.value) startLoadingProgress()
|
||||||
} else if (progressActive.value) {
|
} else if (progressActive.value) {
|
||||||
@@ -322,7 +321,7 @@ onUnmounted(() => {
|
|||||||
<template>
|
<template>
|
||||||
<VDialog scrollable max-width="60rem" :fullscreen="!display.mdAndUp.value">
|
<VDialog scrollable max-width="60rem" :fullscreen="!display.mdAndUp.value">
|
||||||
<VCard class="mx-auto" width="100%">
|
<VCard class="mx-auto" width="100%">
|
||||||
<VCardItem class="py-2">
|
<VCardItem :class="{'py-2': dataList.length > 0}">
|
||||||
<VDialogCloseBtn @click="emit('close')" />
|
<VDialogCloseBtn @click="emit('close')" />
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<VIcon icon="mdi-menu" color="primary" size="28" class="me-2" />
|
<VIcon icon="mdi-menu" color="primary" size="28" class="me-2" />
|
||||||
@@ -487,12 +486,14 @@ onUnmounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* stylelint-disable selector-pseudo-class-no-unknown */
|
||||||
|
|
||||||
.transfer-queue-content {
|
.transfer-queue-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-block-size: 34rem;
|
|
||||||
padding: 1.5rem !important;
|
padding: 1.5rem !important;
|
||||||
|
min-block-size: 34rem;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,10 +545,10 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.media-selector {
|
.media-selector {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow-y: auto;
|
|
||||||
border-inline-end: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
border-inline-end: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
|
overflow-y: auto;
|
||||||
padding-block: 0.25rem;
|
padding-block: 0.25rem;
|
||||||
padding-inline: 0.25rem 1rem;
|
padding-inline: 0.25rem 1rem;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
@@ -557,6 +558,7 @@ onUnmounted(() => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 0.9rem;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@@ -564,9 +566,10 @@ onUnmounted(() => {
|
|||||||
gap: 0.9rem;
|
gap: 0.9rem;
|
||||||
grid-template-columns: 4.25rem minmax(0, 1fr);
|
grid-template-columns: 4.25rem minmax(0, 1fr);
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
padding: 0.9rem;
|
|
||||||
text-align: start;
|
text-align: start;
|
||||||
transition: background-color 0.18s ease, color 0.18s ease;
|
transition:
|
||||||
|
background-color 0.18s ease,
|
||||||
|
color 0.18s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-selector__item + .media-selector__item {
|
.media-selector__item + .media-selector__item {
|
||||||
@@ -582,7 +585,9 @@ onUnmounted(() => {
|
|||||||
inline-size: 3px;
|
inline-size: 3px;
|
||||||
inset-block-start: 50%;
|
inset-block-start: 50%;
|
||||||
inset-inline-start: 0.25rem;
|
inset-inline-start: 0.25rem;
|
||||||
transition: block-size 0.18s ease, inset-block-start 0.18s ease;
|
transition:
|
||||||
|
block-size 0.18s ease,
|
||||||
|
inset-block-start 0.18s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-selector__item:hover {
|
.media-selector__item:hover {
|
||||||
@@ -605,8 +610,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.media-selector__poster {
|
.media-selector__poster {
|
||||||
aspect-ratio: 2 / 3;
|
|
||||||
flex: 0 0 4.25rem;
|
flex: 0 0 4.25rem;
|
||||||
|
aspect-ratio: 2 / 3;
|
||||||
inline-size: 4.25rem;
|
inline-size: 4.25rem;
|
||||||
max-inline-size: 4.25rem;
|
max-inline-size: 4.25rem;
|
||||||
}
|
}
|
||||||
@@ -655,8 +660,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.active-media__poster {
|
.active-media__poster {
|
||||||
aspect-ratio: 2 / 3;
|
|
||||||
flex: 0 0 4rem;
|
flex: 0 0 4rem;
|
||||||
|
aspect-ratio: 2 / 3;
|
||||||
inline-size: 4rem !important;
|
inline-size: 4rem !important;
|
||||||
max-inline-size: 4rem;
|
max-inline-size: 4rem;
|
||||||
}
|
}
|
||||||
@@ -666,11 +671,11 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.active-media__title {
|
.active-media__title {
|
||||||
|
margin: 0;
|
||||||
color: rgba(var(--v-theme-on-surface), 0.95);
|
color: rgba(var(--v-theme-on-surface), 0.95);
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
margin: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.active-media__meta {
|
.active-media__meta {
|
||||||
@@ -695,8 +700,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.queue-task-list {
|
.queue-task-list {
|
||||||
overflow-y: auto;
|
|
||||||
max-block-size: 23rem;
|
max-block-size: 23rem;
|
||||||
|
overflow-y: auto;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,8 +782,8 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
@media (width <= 959.98px) {
|
@media (width <= 959.98px) {
|
||||||
.transfer-queue-content {
|
.transfer-queue-content {
|
||||||
overflow-y: auto;
|
|
||||||
min-block-size: 0;
|
min-block-size: 0;
|
||||||
|
overflow-y: auto;
|
||||||
padding-block: 0.75rem calc(0.75rem + env(safe-area-inset-bottom)) !important;
|
padding-block: 0.75rem calc(0.75rem + env(safe-area-inset-bottom)) !important;
|
||||||
padding-inline: 1rem !important;
|
padding-inline: 1rem !important;
|
||||||
}
|
}
|
||||||
@@ -787,7 +792,8 @@ onUnmounted(() => {
|
|||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
gap: 0.5rem 0.75rem;
|
gap: 0.5rem 0.75rem;
|
||||||
grid-template-columns: auto 1fr auto;
|
grid-template-columns: auto 1fr auto;
|
||||||
padding: 0.75rem 1rem;
|
padding-block: 0.75rem;
|
||||||
|
padding-inline: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.queue-overall__count {
|
.queue-overall__count {
|
||||||
@@ -806,12 +812,11 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.media-selector {
|
.media-selector {
|
||||||
overflow-x: auto;
|
|
||||||
overflow-y: hidden;
|
|
||||||
border-inline-end: 0;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
border-inline-end: 0;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
margin-inline: -1rem;
|
margin-inline: -1rem;
|
||||||
|
overflow: auto hidden;
|
||||||
padding-block: 0.5rem 1rem;
|
padding-block: 0.5rem 1rem;
|
||||||
padding-inline: 1.25rem;
|
padding-inline: 1.25rem;
|
||||||
scroll-snap-type: inline mandatory;
|
scroll-snap-type: inline mandatory;
|
||||||
@@ -819,10 +824,10 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.media-selector__item {
|
.media-selector__item {
|
||||||
flex: 0 0 10rem;
|
flex: 0 0 10rem;
|
||||||
|
padding: 0.5rem;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
grid-template-columns: 3.5rem minmax(0, 1fr);
|
grid-template-columns: 3.5rem minmax(0, 1fr);
|
||||||
padding: 0.5rem;
|
|
||||||
scroll-snap-align: start;
|
scroll-snap-align: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user