修复最近下载不显示bug顺便美化

This commit is contained in:
2025-09-29 16:24:39 +08:00
parent 423d35d42d
commit 00f00711ad
4 changed files with 262 additions and 43 deletions
@@ -50,7 +50,7 @@
</div> </div>
<!-- 批量下载的详细进度 --> <!-- 批量下载的详细进度 -->
<div v-if="task.type === 'batch' || task.type === 'artist'" class="batch-progress"> <div v-if="task.type === 'batch' || task.type === 'artist' || task.type === 'art'" class="batch-progress">
<div class="batch-stats"> <div class="batch-stats">
<div class="stat-item"> <div class="stat-item">
<span class="stat-label">已完成:</span> <span class="stat-label">已完成:</span>
@@ -481,41 +481,114 @@ onUnmounted(() => {
/* 批量下载进度样式 */ /* 批量下载进度样式 */
.batch-progress { .batch-progress {
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
padding: 0.75rem; padding: 0;
background: white; background: transparent;
border-radius: 0.375rem; border: none;
border: 1px solid #e2e8f0; border-radius: 0;
} }
.batch-stats { .batch-stats {
display: flex; display: grid;
gap: 1rem; grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
.stat-item { .stat-item {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
gap: 0.25rem; padding: 0.75rem 0.5rem;
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-radius: 0.5rem;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
border: 1px solid rgba(226, 232, 240, 0.8);
transition: all 0.2s ease;
position: relative;
overflow: hidden;
} }
.stat-label { .stat-item::before {
font-size: 0.75rem; content: '';
color: #6b7280; position: absolute;
font-weight: 500; top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
transition: all 0.2s ease;
}
.stat-item:hover {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.stat-item:hover::before {
background: linear-gradient(90deg, #3b82f6, #1d4ed8);
} }
.stat-value { .stat-value {
font-size: 0.75rem; font-size: 1.125rem;
font-weight: 600; font-weight: 700;
margin-bottom: 0.125rem;
line-height: 1;
}
.stat-label {
font-size: 0.625rem;
color: #64748b;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
} }
.stat-value.success { .stat-value.success {
color: #059669; color: #059669;
background: linear-gradient(135deg, #059669, #047857);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-value.success + .stat-label {
color: #047857;
}
.stat-item:has(.stat-value.success)::before {
background: linear-gradient(90deg, #10b981, #059669);
} }
.stat-value.error { .stat-value.error {
color: #dc2626; color: #dc2626;
background: linear-gradient(135deg, #dc2626, #b91c1c);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-value.error + .stat-label {
color: #b91c1c;
}
.stat-item:has(.stat-value.error)::before {
background: linear-gradient(90deg, #ef4444, #dc2626);
}
.stat-item:has(.stat-value:not(.success):not(.error))::before {
background: linear-gradient(90deg, #6366f1, #4f46e5);
}
.stat-item:has(.stat-value:not(.success):not(.error)) .stat-value {
color: #4f46e5;
background: linear-gradient(135deg, #6366f1, #4f46e5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-item:has(.stat-value:not(.success):not(.error)) .stat-label {
color: #4f46e5;
} }
.recent-completed h5 { .recent-completed h5 {
+87 -14
View File
@@ -26,7 +26,7 @@
</div> </div>
<!-- 批量下载的详细进度 --> <!-- 批量下载的详细进度 -->
<div v-if="task.type === 'batch' || task.type === 'artist'" class="batch-progress"> <div v-if="task.type === 'batch' || task.type === 'artist' || task.type === 'art'" class="batch-progress">
<div class="batch-stats"> <div class="batch-stats">
<div class="stat-item"> <div class="stat-item">
<span class="stat-label">已完成:</span> <span class="stat-label">已完成:</span>
@@ -435,41 +435,114 @@ const cancelTask = async () => {
/* 批量下载进度样式 */ /* 批量下载进度样式 */
.batch-progress { .batch-progress {
margin: 1rem 0; margin: 1rem 0;
padding: 1rem; padding: 0;
background: #f8fafc; background: transparent;
border-radius: 0.5rem; border: none;
border: 1px solid #e2e8f0; border-radius: 0;
} }
.batch-stats { .batch-stats {
display: flex; display: grid;
gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 0.75rem;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.stat-item { .stat-item {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
gap: 0.5rem; padding: 1rem 0.75rem;
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-radius: 0.75rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
border: 1px solid rgba(226, 232, 240, 0.8);
transition: all 0.2s ease;
position: relative;
overflow: hidden;
} }
.stat-label { .stat-item::before {
font-size: 0.875rem; content: '';
color: #6b7280; position: absolute;
font-weight: 500; top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
transition: all 0.2s ease;
}
.stat-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.stat-item:hover::before {
background: linear-gradient(90deg, #3b82f6, #1d4ed8);
} }
.stat-value { .stat-value {
font-size: 0.875rem; font-size: 1.5rem;
font-weight: 600; font-weight: 700;
margin-bottom: 0.25rem;
line-height: 1;
}
.stat-label {
font-size: 0.75rem;
color: #64748b;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
} }
.stat-value.success { .stat-value.success {
color: #059669; color: #059669;
background: linear-gradient(135deg, #059669, #047857);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-value.success + .stat-label {
color: #047857;
}
.stat-item:has(.stat-value.success)::before {
background: linear-gradient(90deg, #10b981, #059669);
} }
.stat-value.error { .stat-value.error {
color: #dc2626; color: #dc2626;
background: linear-gradient(135deg, #dc2626, #b91c1c);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-value.error + .stat-label {
color: #b91c1c;
}
.stat-item:has(.stat-value.error)::before {
background: linear-gradient(90deg, #ef4444, #dc2626);
}
.stat-item:has(.stat-value:not(.success):not(.error))::before {
background: linear-gradient(90deg, #6366f1, #4f46e5);
}
.stat-item:has(.stat-value:not(.success):not(.error)) .stat-value {
color: #4f46e5;
background: linear-gradient(135deg, #6366f1, #4f46e5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-item:has(.stat-value:not(.success):not(.error)) .stat-label {
color: #4f46e5;
} }
.recent-completed h4 { .recent-completed h4 {
+1 -1
View File
@@ -98,7 +98,7 @@ export interface LoginStatus {
// 下载任务 // 下载任务
export interface DownloadTask { export interface DownloadTask {
id: string; id: string;
type: 'artwork' | 'batch' | 'artist'; type: 'artwork' | 'batch' | 'artist' | 'art';
status: 'downloading' | 'completed' | 'failed' | 'partial' | 'cancelled' | 'paused'; status: 'downloading' | 'completed' | 'failed' | 'partial' | 'cancelled' | 'paused';
progress: number; progress: number;
total_files: number; total_files: number;
+87 -14
View File
@@ -84,7 +84,7 @@
</div> </div>
<!-- 批量下载的详细进度 --> <!-- 批量下载的详细进度 -->
<div v-if="task.type === 'batch' || task.type === 'artist'" class="batch-progress"> <div v-if="task.type === 'batch' || task.type === 'artist' || task.type === 'art'" class="batch-progress">
<div class="batch-stats"> <div class="batch-stats">
<div class="stat-item"> <div class="stat-item">
<span class="stat-label">已完成:</span> <span class="stat-label">已完成:</span>
@@ -713,41 +713,114 @@ onUnmounted(() => {
/* 批量下载进度样式 */ /* 批量下载进度样式 */
.batch-progress { .batch-progress {
margin-bottom: 1rem; margin-bottom: 1rem;
padding: 1rem; padding: 0;
background: #f8fafc; background: transparent;
border-radius: 0.5rem; border: none;
border: 1px solid #e2e8f0; border-radius: 0;
} }
.batch-stats { .batch-stats {
display: flex; display: grid;
gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 0.75rem;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.stat-item { .stat-item {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
gap: 0.5rem; padding: 1rem 0.75rem;
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-radius: 0.75rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
border: 1px solid rgba(226, 232, 240, 0.8);
transition: all 0.2s ease;
position: relative;
overflow: hidden;
} }
.stat-label { .stat-item::before {
font-size: 0.875rem; content: '';
color: #6b7280; position: absolute;
font-weight: 500; top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
transition: all 0.2s ease;
}
.stat-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.stat-item:hover::before {
background: linear-gradient(90deg, #3b82f6, #1d4ed8);
} }
.stat-value { .stat-value {
font-size: 0.875rem; font-size: 1.5rem;
font-weight: 600; font-weight: 700;
margin-bottom: 0.25rem;
line-height: 1;
}
.stat-label {
font-size: 0.75rem;
color: #64748b;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
} }
.stat-value.success { .stat-value.success {
color: #059669; color: #059669;
background: linear-gradient(135deg, #059669, #047857);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-value.success + .stat-label {
color: #047857;
}
.stat-item:has(.stat-value.success)::before {
background: linear-gradient(90deg, #10b981, #059669);
} }
.stat-value.error { .stat-value.error {
color: #dc2626; color: #dc2626;
background: linear-gradient(135deg, #dc2626, #b91c1c);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-value.error + .stat-label {
color: #b91c1c;
}
.stat-item:has(.stat-value.error)::before {
background: linear-gradient(90deg, #ef4444, #dc2626);
}
.stat-item:has(.stat-value:not(.success):not(.error))::before {
background: linear-gradient(90deg, #6366f1, #4f46e5);
}
.stat-item:has(.stat-value:not(.success):not(.error)) .stat-value {
color: #4f46e5;
background: linear-gradient(135deg, #6366f1, #4f46e5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.stat-item:has(.stat-value:not(.success):not(.error)) .stat-label {
color: #4f46e5;
} }
.recent-completed h4 { .recent-completed h4 {