fix: 修正清单进度文字折行,默认最多翻 99 页
进度数字固定在进度条左侧,不再被挤出窗口。
This commit is contained in:
+3
-3
@@ -164,7 +164,7 @@ const downloadRef = ref<{
|
||||
loadDirectory: () => Promise<void>;
|
||||
} | null>(null);
|
||||
const catalogQuery = ref("");
|
||||
const catalogMaxPages = ref(300);
|
||||
const catalogMaxPages = ref(99);
|
||||
let catalogPagesTimer: number | null = null;
|
||||
const mainMenu = computed(() => [
|
||||
{ label: "视频清单", key: "download" },
|
||||
@@ -402,7 +402,7 @@ function normalizeWorkers(value: unknown) {
|
||||
|
||||
function normalizeCatalogPages(value: unknown) {
|
||||
const count = Number(value);
|
||||
if (!Number.isInteger(count) || count < 1) return 300;
|
||||
if (!Number.isInteger(count) || count < 1) return 99;
|
||||
return Math.min(count, 999);
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ async function loadCatalogSettings() {
|
||||
const payload = await response.json();
|
||||
catalogMaxPages.value = normalizeCatalogPages(payload.max_pages);
|
||||
} catch {
|
||||
catalogMaxPages.value = 300;
|
||||
catalogMaxPages.value = 99;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -732,15 +732,16 @@ async function startDownload() {
|
||||
<template>
|
||||
<div class="download-page">
|
||||
<div v-if="showProgress" class="load-strip">
|
||||
<n-progress
|
||||
class="load-strip-bar"
|
||||
type="line"
|
||||
:percentage="progress"
|
||||
:show-indicator="false"
|
||||
:processing="busy || coverPending"
|
||||
:height="8"
|
||||
/>
|
||||
<n-text class="load-strip-text" depth="3">{{ progressText }}</n-text>
|
||||
<n-text class="load-strip-text">{{ progressText }}</n-text>
|
||||
<div class="load-strip-bar">
|
||||
<n-progress
|
||||
type="line"
|
||||
:percentage="progress"
|
||||
:show-indicator="false"
|
||||
:processing="busy || coverPending"
|
||||
:height="8"
|
||||
/>
|
||||
</div>
|
||||
<n-tooltip v-if="busy">
|
||||
<template #trigger>
|
||||
<n-button size="small" secondary @click="stopLoad">停止</n-button>
|
||||
@@ -856,19 +857,26 @@ async function startDownload() {
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.download-page { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.download-page { width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.load-strip {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
min-height: 44px;
|
||||
padding: 8px 20px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
background: #18181c;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.load-strip-bar { width: 180px; flex: none; }
|
||||
.load-strip-text { flex: 1; min-width: 0; }
|
||||
.load-strip-text {
|
||||
flex: none;
|
||||
white-space: nowrap;
|
||||
line-height: 22px;
|
||||
}
|
||||
.load-strip-bar { flex: 1; min-width: 0; }
|
||||
.load-strip-bar .n-progress { width: 100%; }
|
||||
.download-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.download-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 0 12px; }
|
||||
.download-foot {
|
||||
|
||||
Reference in New Issue
Block a user