mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 17:26:41 +08:00
feat: 使用 ProgressiveCardGrid 组件优化移动端缓存和历史记录展示
This commit is contained in:
+50
-40
@@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n'
|
|||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import type { ApiResponse, RecognitionCacheData, RecognitionCacheItem } from '@/api/types'
|
import type { ApiResponse, RecognitionCacheData, RecognitionCacheItem } from '@/api/types'
|
||||||
import { useConfirm } from '@/composables/useConfirm'
|
import { useConfirm } from '@/composables/useConfirm'
|
||||||
|
import ProgressiveCardGrid from '@/components/misc/ProgressiveCardGrid.vue'
|
||||||
import { useGlobalSettingsStore } from '@/stores'
|
import { useGlobalSettingsStore } from '@/stores'
|
||||||
import { getDisplayImageUrl } from '@/utils/imageUtils'
|
import { getDisplayImageUrl } from '@/utils/imageUtils'
|
||||||
|
|
||||||
@@ -13,7 +14,6 @@ type InfiniteScrollStatus = 'ok' | 'empty' | 'loading' | 'error'
|
|||||||
type RecognitionCacheSource = 'tmdb' | 'douban'
|
type RecognitionCacheSource = 'tmdb' | 'douban'
|
||||||
|
|
||||||
const MOBILE_CACHE_PAGE_SIZE = 20
|
const MOBILE_CACHE_PAGE_SIZE = 20
|
||||||
const MOBILE_CACHE_ITEM_HEIGHT = 144
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const display = useDisplay()
|
const display = useDisplay()
|
||||||
@@ -74,8 +74,7 @@ const filteredData = computed(() => {
|
|||||||
!keyword ||
|
!keyword ||
|
||||||
[item.key, item.title, item.year, getRecognitionId(item)].some(value => value.toLowerCase().includes(keyword))
|
[item.key, item.title, item.year, getRecognitionId(item)].some(value => value.toLowerCase().includes(keyword))
|
||||||
const matchesStatus =
|
const matchesStatus =
|
||||||
statusFilter.value === 'all' ||
|
statusFilter.value === 'all' || (statusFilter.value === 'recognized' ? isRecognized(item) : !isRecognized(item))
|
||||||
(statusFilter.value === 'recognized' ? isRecognized(item) : !isRecognized(item))
|
|
||||||
return matchesKeyword && matchesStatus
|
return matchesKeyword && matchesStatus
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -155,7 +154,9 @@ async function clearAllCache() {
|
|||||||
|
|
||||||
/** 请求当前识别数据源接口删除指定识别缓存。 */
|
/** 请求当前识别数据源接口删除指定识别缓存。 */
|
||||||
async function deleteCacheItem(key: string) {
|
async function deleteCacheItem(key: string) {
|
||||||
const response = (await api.delete(`${recognitionCacheEndpoint.value}/${encodeURIComponent(key)}`)) as unknown as ApiResponse
|
const response = (await api.delete(
|
||||||
|
`${recognitionCacheEndpoint.value}/${encodeURIComponent(key)}`,
|
||||||
|
)) as unknown as ApiResponse
|
||||||
if (!response.success) throw new Error(response.message)
|
if (!response.success) throw new Error(response.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,6 +218,11 @@ function isRecognized(item: RecognitionCacheItem): boolean {
|
|||||||
return Boolean(recognitionId && recognitionId !== '0')
|
return Boolean(recognitionId && recognitionId !== '0')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获取移动端识别缓存卡片的稳定渲染 key。 */
|
||||||
|
function getRecognitionCacheItemKey(item: RecognitionCacheItem): string {
|
||||||
|
return item.key
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取本地化的媒体类型名称。 */
|
/** 获取本地化的媒体类型名称。 */
|
||||||
function getMediaTypeLabel(mediaType: string): string {
|
function getMediaTypeLabel(mediaType: string): string {
|
||||||
if (mediaType === 'movie') return t('setting.cache.mediaType.movie')
|
if (mediaType === 'movie') return t('setting.cache.mediaType.movie')
|
||||||
@@ -359,14 +365,17 @@ watch(recognitionSource, () => {
|
|||||||
|
|
||||||
<template #empty />
|
<template #empty />
|
||||||
|
|
||||||
<VVirtualScroll
|
<ProgressiveCardGrid
|
||||||
v-if="mobileVisibleData.length > 0"
|
v-if="mobileVisibleData.length > 0"
|
||||||
renderless
|
|
||||||
:items="mobileVisibleData"
|
:items="mobileVisibleData"
|
||||||
:item-height="MOBILE_CACHE_ITEM_HEIGHT"
|
:columns="1"
|
||||||
|
:gap="10"
|
||||||
|
:estimated-item-height="152"
|
||||||
|
:overscan-rows="5"
|
||||||
|
:get-item-key="getRecognitionCacheItemKey"
|
||||||
>
|
>
|
||||||
<template #default="{ item, itemRef }">
|
<template #default="{ item }">
|
||||||
<article :ref="itemRef" :key="item.key" class="recognition-cache-mobile-item">
|
<article class="recognition-cache-mobile-item">
|
||||||
<div class="recognition-cache-poster">
|
<div class="recognition-cache-poster">
|
||||||
<VImg v-if="getPosterUrl(item)" :src="getPosterUrl(item)" :alt="item.title || item.key" cover />
|
<VImg v-if="getPosterUrl(item)" :src="getPosterUrl(item)" :alt="item.title || item.key" cover />
|
||||||
<VIcon v-else icon="mdi-image-off-outline" size="28" />
|
<VIcon v-else icon="mdi-image-off-outline" size="28" />
|
||||||
@@ -398,7 +407,7 @@ watch(recognitionSource, () => {
|
|||||||
</VBtn>
|
</VBtn>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
</VVirtualScroll>
|
</ProgressiveCardGrid>
|
||||||
</VInfiniteScroll>
|
</VInfiniteScroll>
|
||||||
|
|
||||||
<div v-else class="cache-panel-empty">
|
<div v-else class="cache-panel-empty">
|
||||||
@@ -478,9 +487,9 @@ watch(recognitionSource, () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-block-size: 0;
|
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
|
min-block-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-toolbar {
|
.cache-panel-toolbar {
|
||||||
@@ -503,10 +512,11 @@ watch(recognitionSource, () => {
|
|||||||
border-radius: var(--app-surface-radius);
|
border-radius: var(--app-surface-radius);
|
||||||
background: var(--app-grouped-list-background);
|
background: var(--app-grouped-list-background);
|
||||||
box-shadow: var(--app-surface-shadow);
|
box-shadow: var(--app-surface-shadow);
|
||||||
|
gap: 10px;
|
||||||
min-block-size: 58px;
|
min-block-size: 58px;
|
||||||
min-inline-size: 126px;
|
min-inline-size: 126px;
|
||||||
padding: 10px 14px;
|
padding-block: 10px;
|
||||||
gap: 10px;
|
padding-inline: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-stat strong,
|
.cache-panel-stat strong,
|
||||||
@@ -521,9 +531,9 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-stat span {
|
.cache-panel-stat span {
|
||||||
margin-block-start: 3px;
|
|
||||||
color: rgba(var(--v-theme-on-surface), 0.58);
|
color: rgba(var(--v-theme-on-surface), 0.58);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
margin-block-start: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-stat--primary {
|
.cache-panel-stat--primary {
|
||||||
@@ -597,23 +607,23 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-table__key {
|
.recognition-cache-table__key {
|
||||||
max-inline-size: 36rem;
|
|
||||||
color: rgba(var(--v-theme-on-surface), 0.68);
|
color: rgba(var(--v-theme-on-surface), 0.68);
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
max-inline-size: 36rem;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-result {
|
.recognition-cache-result {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-result strong {
|
.recognition-cache-result strong {
|
||||||
inline-size: 100%;
|
|
||||||
color: rgba(var(--v-theme-on-surface), 0.88);
|
color: rgba(var(--v-theme-on-surface), 0.88);
|
||||||
|
inline-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-result span {
|
.recognition-cache-result span {
|
||||||
@@ -623,14 +633,14 @@ watch(recognitionSource, () => {
|
|||||||
|
|
||||||
.cache-panel-empty {
|
.cache-panel-empty {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
|
||||||
min-block-size: 14rem;
|
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
color: rgba(var(--v-theme-on-surface), 0.48);
|
color: rgba(var(--v-theme-on-surface), 0.48);
|
||||||
text-align: center;
|
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
min-block-size: 14rem;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-empty strong {
|
.cache-panel-empty strong {
|
||||||
@@ -639,15 +649,16 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-empty span {
|
.cache-panel-empty span {
|
||||||
max-inline-size: 30rem;
|
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
max-inline-size: 30rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 959.98px) {
|
@media (width <= 959.98px) {
|
||||||
.recognition-cache-panel {
|
.recognition-cache-panel {
|
||||||
overflow-y: auto;
|
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
|
overflow-y: auto;
|
||||||
|
padding-block: 14px calc(18px + env(safe-area-inset-bottom));
|
||||||
|
padding-inline: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-toolbar {
|
.cache-panel-toolbar {
|
||||||
@@ -662,12 +673,12 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-stat {
|
.cache-panel-stat {
|
||||||
align-items: center;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
min-block-size: 92px;
|
align-items: center;
|
||||||
min-inline-size: 0;
|
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
|
min-block-size: 92px;
|
||||||
|
min-inline-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-stat strong {
|
.cache-panel-stat strong {
|
||||||
@@ -678,9 +689,9 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-stat span {
|
.cache-panel-stat span {
|
||||||
margin-block-start: 8px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
margin-block-start: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-filters {
|
.cache-panel-filters {
|
||||||
@@ -693,9 +704,9 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-panel-filter :deep(.v-field__input) {
|
.cache-panel-filter :deep(.v-field__input) {
|
||||||
min-block-size: 54px;
|
|
||||||
color: rgba(var(--v-theme-on-surface), 0.72);
|
color: rgba(var(--v-theme-on-surface), 0.72);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
min-block-size: 54px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-mobile-scroll {
|
.recognition-cache-mobile-scroll {
|
||||||
@@ -704,8 +715,8 @@ watch(recognitionSource, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-mobile-scroll :deep(.v-infinite-scroll__container),
|
.recognition-cache-mobile-scroll :deep(.v-infinite-scroll__container),
|
||||||
.recognition-cache-mobile-scroll :deep(.v-virtual-scroll),
|
.recognition-cache-mobile-scroll :deep(.progressive-card-grid),
|
||||||
.recognition-cache-mobile-scroll :deep(.v-virtual-scroll__container) {
|
.recognition-cache-mobile-scroll :deep(.progressive-card-grid__track) {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -715,28 +726,27 @@ watch(recognitionSource, () => {
|
|||||||
|
|
||||||
.cache-panel-load-state {
|
.cache-panel-load-state {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
|
||||||
min-block-size: 70px;
|
|
||||||
color: rgba(var(--v-theme-on-surface), 0.58);
|
color: rgba(var(--v-theme-on-surface), 0.58);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
min-block-size: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-mobile-item {
|
.recognition-cache-mobile-item {
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
|
padding: 12px;
|
||||||
border: var(--app-surface-border);
|
border: var(--app-surface-border);
|
||||||
border-radius: var(--app-surface-radius);
|
border-radius: var(--app-surface-radius);
|
||||||
backdrop-filter: var(--app-grouped-list-backdrop-filter);
|
backdrop-filter: var(--app-grouped-list-backdrop-filter);
|
||||||
background: var(--app-grouped-list-background);
|
background: var(--app-grouped-list-background);
|
||||||
box-shadow: var(--app-surface-shadow);
|
box-shadow: var(--app-surface-shadow);
|
||||||
grid-template-columns: 54px minmax(0, 1fr) 36px;
|
|
||||||
margin-block-end: 10px;
|
|
||||||
padding: 12px;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
grid-template-columns: 54px minmax(0, 1fr) 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-poster {
|
.recognition-cache-poster {
|
||||||
@@ -757,25 +767,25 @@ watch(recognitionSource, () => {
|
|||||||
|
|
||||||
.recognition-cache-mobile-item__meta {
|
.recognition-cache-mobile-item__meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-block-start: 7px;
|
align-items: center;
|
||||||
color: rgba(var(--v-theme-on-surface), 0.58);
|
color: rgba(var(--v-theme-on-surface), 0.58);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
gap: 7px;
|
gap: 7px;
|
||||||
|
margin-block-start: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recognition-cache-mobile-item__key {
|
.recognition-cache-mobile-item__key {
|
||||||
margin-block-start: 8px;
|
|
||||||
color: rgba(var(--v-theme-on-surface), 0.48);
|
color: rgba(var(--v-theme-on-surface), 0.48);
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 1.35;
|
line-height: 1.35;
|
||||||
|
margin-block-start: 8px;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 374.98px) {
|
@media (width <= 374.98px) {
|
||||||
.recognition-cache-panel {
|
.recognition-cache-panel {
|
||||||
padding-inline: 12px;
|
padding-inline: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { useDisplay } from 'vuetify'
|
|||||||
import { formatFileSize } from '@/@core/utils/formatters'
|
import { formatFileSize } from '@/@core/utils/formatters'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { usePWA } from '@/composables/usePWA'
|
import { usePWA } from '@/composables/usePWA'
|
||||||
|
import ProgressiveCardGrid from '@/components/misc/ProgressiveCardGrid.vue'
|
||||||
import { useDynamicButton, type DynamicButtonMenuItem } from '@/composables/useDynamicButton'
|
import { useDynamicButton, type DynamicButtonMenuItem } from '@/composables/useDynamicButton'
|
||||||
import { useAvailableHeight } from '@/composables/useAvailableHeight'
|
import { useAvailableHeight } from '@/composables/useAvailableHeight'
|
||||||
import { useBackground } from '@/composables/useBackground'
|
import { useBackground } from '@/composables/useBackground'
|
||||||
@@ -1092,6 +1093,11 @@ function isHistorySelected(item: TransferHistory) {
|
|||||||
return selectedIdSet.value.has(item.id)
|
return selectedIdSet.value.has(item.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取移动端历史记录卡片的稳定渲染 key。
|
||||||
|
function getMobileHistoryItemKey(item: TransferHistory) {
|
||||||
|
return item.id
|
||||||
|
}
|
||||||
|
|
||||||
// 批量设置历史记录选中状态,并按 ID 去重。
|
// 批量设置历史记录选中状态,并按 ID 去重。
|
||||||
function updateHistorySelection(items: readonly TransferHistory[], checked: boolean | null) {
|
function updateHistorySelection(items: readonly TransferHistory[], checked: boolean | null) {
|
||||||
const itemIds = new Set(items.map(item => item.id))
|
const itemIds = new Set(items.map(item => item.id))
|
||||||
@@ -1607,7 +1613,9 @@ onUnmounted(() => {
|
|||||||
:aria-label="
|
:aria-label="
|
||||||
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
||||||
"
|
"
|
||||||
:title="mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')"
|
:title="
|
||||||
|
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
||||||
|
"
|
||||||
variant="text"
|
variant="text"
|
||||||
class="settings-icon-button transfer-history-mobile-titlebar__batch"
|
class="settings-icon-button transfer-history-mobile-titlebar__batch"
|
||||||
@click="toggleMobileBatchMode"
|
@click="toggleMobileBatchMode"
|
||||||
@@ -1649,15 +1657,17 @@ onUnmounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
<template #empty />
|
<template #empty />
|
||||||
|
|
||||||
<VVirtualScroll
|
<ProgressiveCardGrid
|
||||||
v-if="mobileDataList.length > 0"
|
v-if="mobileDataList.length > 0"
|
||||||
renderless
|
|
||||||
:items="mobileDataList"
|
:items="mobileDataList"
|
||||||
:item-height="264"
|
:columns="1"
|
||||||
|
:gap="14"
|
||||||
|
:estimated-item-height="280"
|
||||||
|
:overscan-rows="5"
|
||||||
|
:get-item-key="getMobileHistoryItemKey"
|
||||||
>
|
>
|
||||||
<template #default="{ item, itemRef }">
|
<template #default="{ item }">
|
||||||
<article
|
<article
|
||||||
:ref="itemRef"
|
|
||||||
class="transfer-history-mobile-record"
|
class="transfer-history-mobile-record"
|
||||||
:class="{
|
:class="{
|
||||||
'transfer-history-mobile-record--batch': mobileBatchMode,
|
'transfer-history-mobile-record--batch': mobileBatchMode,
|
||||||
@@ -1680,7 +1690,12 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<VChip class="transfer-history-mobile-record__status" variant="tonal" :color="getHistoryStatusColor(item)" size="small">
|
<VChip
|
||||||
|
class="transfer-history-mobile-record__status"
|
||||||
|
variant="tonal"
|
||||||
|
:color="getHistoryStatusColor(item)"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
{{ getHistoryStatusText(item) }}
|
{{ getHistoryStatusText(item) }}
|
||||||
</VChip>
|
</VChip>
|
||||||
|
|
||||||
@@ -1753,7 +1768,7 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
</VVirtualScroll>
|
</ProgressiveCardGrid>
|
||||||
</VInfiniteScroll>
|
</VInfiniteScroll>
|
||||||
|
|
||||||
<div v-if="mobileDataList.length === 0 && isRefreshed && !mobileLoading" class="transfer-history-mobile-empty">
|
<div v-if="mobileDataList.length === 0 && isRefreshed && !mobileLoading" class="transfer-history-mobile-empty">
|
||||||
@@ -1821,17 +1836,18 @@ onUnmounted(() => {
|
|||||||
--transfer-history-mobile-surface-blur: none;
|
--transfer-history-mobile-surface-blur: none;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
min-block-size: 100%;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 0.25rem 0.35rem 1.25rem;
|
min-block-size: 100%;
|
||||||
|
padding-block: 0.25rem 1.25rem;
|
||||||
|
padding-inline: 0.35rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-titlebar {
|
.transfer-history-mobile-titlebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-title {
|
.transfer-history-mobile-title {
|
||||||
@@ -1862,13 +1878,13 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-scroll {
|
.transfer-history-mobile-scroll {
|
||||||
min-block-size: 22rem;
|
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
|
min-block-size: 22rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-scroll :deep(.v-infinite-scroll__container),
|
.transfer-history-mobile-scroll :deep(.v-infinite-scroll__container),
|
||||||
.transfer-history-mobile-scroll :deep(.v-virtual-scroll),
|
.transfer-history-mobile-scroll :deep(.progressive-card-grid),
|
||||||
.transfer-history-mobile-scroll :deep(.v-virtual-scroll__container) {
|
.transfer-history-mobile-scroll :deep(.progressive-card-grid__track) {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1889,9 +1905,9 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-empty {
|
.transfer-history-mobile-empty {
|
||||||
min-block-size: 18rem;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
|
min-block-size: 18rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-record {
|
.transfer-history-mobile-record {
|
||||||
@@ -1911,16 +1927,13 @@ onUnmounted(() => {
|
|||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-record + .transfer-history-mobile-record {
|
|
||||||
margin-block-start: 0.875rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.transfer-history-mobile-record__header {
|
.transfer-history-mobile-record__header {
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
grid-template-columns: 3rem minmax(0, 1fr) auto 2rem;
|
grid-template-columns: 3rem minmax(0, 1fr) auto 2rem;
|
||||||
padding: 1rem 0.85rem 0.75rem 1rem;
|
padding-block: 1rem 0.75rem;
|
||||||
|
padding-inline: 1rem 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-record__avatar {
|
.transfer-history-mobile-record__avatar {
|
||||||
@@ -1963,13 +1976,11 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-record__menu {
|
.transfer-history-mobile-record__menu {
|
||||||
align-self: start;
|
place-self: start end;
|
||||||
justify-self: end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-record__checkbox {
|
.transfer-history-mobile-record__checkbox {
|
||||||
align-self: start;
|
place-self: start end;
|
||||||
justify-self: end;
|
|
||||||
margin-block-start: -0.35rem;
|
margin-block-start: -0.35rem;
|
||||||
margin-inline-end: -0.35rem;
|
margin-inline-end: -0.35rem;
|
||||||
}
|
}
|
||||||
@@ -1981,9 +1992,10 @@ onUnmounted(() => {
|
|||||||
.transfer-history-mobile-record__meta {
|
.transfer-history-mobile-record__meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 1rem 0.85rem 1rem;
|
|
||||||
gap: 0.65rem;
|
gap: 0.65rem;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
padding-block: 0 0.85rem;
|
||||||
|
padding-inline: 1rem;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -2011,14 +2023,15 @@ onUnmounted(() => {
|
|||||||
.transfer-history-mobile-record__paths {
|
.transfer-history-mobile-record__paths {
|
||||||
display: grid;
|
display: grid;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-block-start: 1px solid rgba(var(--v-theme-on-surface), 0.08);
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
border-block-start: 1px solid rgba(var(--v-theme-on-surface), 0.08);
|
||||||
color: inherit;
|
color: inherit;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
gap: 0.45rem;
|
gap: 0.45rem;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
padding: 0.85rem 1rem 0.95rem;
|
padding-block: 0.85rem 0.95rem;
|
||||||
|
padding-inline: 1rem;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2032,15 +2045,15 @@ onUnmounted(() => {
|
|||||||
.transfer-history-mobile-record__path-arrow {
|
.transfer-history-mobile-record__path-arrow {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
||||||
inline-size: var(--transfer-history-mobile-storage-width);
|
inline-size: var(--transfer-history-mobile-storage-width);
|
||||||
justify-content: center;
|
|
||||||
padding-inline-start: 0.5rem;
|
padding-inline-start: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-history-mobile-record__storage {
|
.transfer-history-mobile-record__storage {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
max-inline-size: 100%;
|
overflow: hidden;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@@ -2048,8 +2061,8 @@ onUnmounted(() => {
|
|||||||
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
max-inline-size: 100%;
|
||||||
min-block-size: 1.55rem;
|
min-block-size: 1.55rem;
|
||||||
overflow: hidden;
|
|
||||||
padding-block: 0.125rem;
|
padding-block: 0.125rem;
|
||||||
padding-inline: 0.425rem;
|
padding-inline: 0.425rem;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@@ -2082,9 +2095,11 @@ onUnmounted(() => {
|
|||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
margin: 0 1rem 1rem;
|
margin-block: 0 1rem;
|
||||||
|
margin-inline: 1rem;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
padding: 0.65rem 0.75rem;
|
padding-block: 0.65rem;
|
||||||
|
padding-inline: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-theme='transparent'] .transfer-history-mobile-page,
|
html[data-theme='transparent'] .transfer-history-mobile-page,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { useGlobalSettingsStore } from '@/stores'
|
|||||||
import { usePWA } from '@/composables/usePWA'
|
import { usePWA } from '@/composables/usePWA'
|
||||||
import { openSharedDialog } from '@/composables/useSharedDialog'
|
import { openSharedDialog } from '@/composables/useSharedDialog'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
|
import ProgressiveCardGrid from '@/components/misc/ProgressiveCardGrid.vue'
|
||||||
import RecognitionCachePanel from '@/components/cache/RecognitionCachePanel.vue'
|
import RecognitionCachePanel from '@/components/cache/RecognitionCachePanel.vue'
|
||||||
|
|
||||||
const CacheReidentifyDialog = defineAsyncComponent(() => import('@/components/dialog/CacheReidentifyDialog.vue'))
|
const CacheReidentifyDialog = defineAsyncComponent(() => import('@/components/dialog/CacheReidentifyDialog.vue'))
|
||||||
@@ -446,14 +447,17 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
|
|
||||||
<template #empty />
|
<template #empty />
|
||||||
|
|
||||||
<VVirtualScroll
|
<ProgressiveCardGrid
|
||||||
v-if="mobileVisibleData.length > 0"
|
v-if="mobileVisibleData.length > 0"
|
||||||
renderless
|
|
||||||
:items="mobileVisibleData"
|
:items="mobileVisibleData"
|
||||||
:item-height="156"
|
:columns="1"
|
||||||
|
:gap="12"
|
||||||
|
:estimated-item-height="168"
|
||||||
|
:overscan-rows="5"
|
||||||
|
:get-item-key="getMobileCacheItemKey"
|
||||||
>
|
>
|
||||||
<template #default="{ item, index, itemRef }">
|
<template #default="{ item }">
|
||||||
<article :ref="itemRef" :key="getMobileCacheItemKey(item, index)" class="cache-mobile-card">
|
<article class="cache-mobile-card">
|
||||||
<div class="cache-mobile-card__poster">
|
<div class="cache-mobile-card__poster">
|
||||||
<VChip
|
<VChip
|
||||||
v-if="item.media_type"
|
v-if="item.media_type"
|
||||||
@@ -540,7 +544,7 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
</VMenu>
|
</VMenu>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
</VVirtualScroll>
|
</ProgressiveCardGrid>
|
||||||
</VInfiniteScroll>
|
</VInfiniteScroll>
|
||||||
|
|
||||||
<div v-else class="cache-mobile-empty">
|
<div v-else class="cache-mobile-empty">
|
||||||
@@ -1015,8 +1019,8 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cache-mobile-scroll :deep(.v-infinite-scroll__container),
|
.cache-mobile-scroll :deep(.v-infinite-scroll__container),
|
||||||
.cache-mobile-scroll :deep(.v-virtual-scroll),
|
.cache-mobile-scroll :deep(.progressive-card-grid),
|
||||||
.cache-mobile-scroll :deep(.v-virtual-scroll__container) {
|
.cache-mobile-scroll :deep(.progressive-card-grid__track) {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,7 +1041,6 @@ watch([titleFilter, siteFilter], () => {
|
|||||||
box-shadow: var(--app-surface-shadow);
|
box-shadow: var(--app-surface-shadow);
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
grid-template-columns: 72px minmax(0, 1fr);
|
grid-template-columns: 72px minmax(0, 1fr);
|
||||||
margin-block-end: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cache-mobile-card__poster {
|
.cache-mobile-card__poster {
|
||||||
|
|||||||
Reference in New Issue
Block a user