From 7b3219198723a050c9160a7f30c2e496dc4a70ab Mon Sep 17 00:00:00 2001
From: sion123 <450702724@qq.com>
Date: Tue, 3 Mar 2026 22:15:06 +0800
Subject: [PATCH] feat: enhance sidebar quota display with progress bar and
improve upload modal UX
- Replace percentage-based quota with point-based display in sidebar
- Add visual progress bar for remaining quota with gradient styling
- Implement upload progress tracking in material upload modal
- Add loading indicators and progress information during file uploads
- Prevent modal interaction while uploading by disabling close controls
- Show current upload status including file index and completion percentage
---
.../web-gold/src/components/SidebarNav.vue | 36 ++-
.../material/MaterialUploadModal.vue | 299 ++++++++++++++++--
frontend/app/web-gold/src/router/index.js | 3 +
.../src/views/material/MaterialListNew.vue | 58 +---
4 files changed, 329 insertions(+), 67 deletions(-)
diff --git a/frontend/app/web-gold/src/components/SidebarNav.vue b/frontend/app/web-gold/src/components/SidebarNav.vue
index 6332a64c57..a1cbe41952 100644
--- a/frontend/app/web-gold/src/components/SidebarNav.vue
+++ b/frontend/app/web-gold/src/components/SidebarNav.vue
@@ -66,7 +66,12 @@ const remainingPercent = computed(() => {
>
{{ maskedMobile }}
-
剩余额度 {{ remainingPercent }}%
+
+
剩余额度 {{ userStore.remainingPoints }} 点
+
+
@@ -187,4 +192,33 @@ const remainingPercent = computed(() => {
font-size: 12px;
color: var(--color-text-secondary);
}
+
+.quota-progress {
+ margin-top: 6px;
+ height: 6px;
+ background: var(--color-gray-100);
+ border-radius: 3px;
+ overflow: hidden;
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
+}
+
+.quota-progress__bar {
+ height: 100%;
+ background: linear-gradient(90deg, #3b82f6, #60a5fa);
+ border-radius: 3px;
+ transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
+ position: relative;
+ box-shadow: 0 1px 3px rgba(59, 130, 246, 0.4);
+}
+
+.quota-progress__bar::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 50%;
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
+ border-radius: 3px 3px 0 0;
+}
diff --git a/frontend/app/web-gold/src/components/material/MaterialUploadModal.vue b/frontend/app/web-gold/src/components/material/MaterialUploadModal.vue
index b9a765e3ad..c7163ff9a2 100644
--- a/frontend/app/web-gold/src/components/material/MaterialUploadModal.vue
+++ b/frontend/app/web-gold/src/components/material/MaterialUploadModal.vue
@@ -4,12 +4,14 @@
title="上传素材"
:width="600"
:footer="false"
+ :closable="!uploading"
+ :maskClosable="!uploading"
@cancel="handleCancel"
@update:visible="handleVisibleChange"
>
-
+
-
+
已选择 {{ fileList.length }} 个文件,总大小:{{ getTotalSize() }}
@@ -61,11 +63,69 @@
+
+
+
+
+
+
+
+ 总体进度
+ {{ totalProgress }}%
+
+
+
+
+
+
+
+
+ {{ currentFileName }}
+
+
+
+ {{ formatFileSize(currentFileUploaded) }} / {{ formatFileSize(currentFileSize) }}
+ {{ currentFileProgress }}%
+
+
+
+
+
+
+
+
+
+
+
+ {{ file.name }}
+
+
+
+
+
- 取消
+ 取消
{{ uploading ? '上传中...' : `上传 (${fileList.length})` }}
+ 上传中请勿关闭窗口...
@@ -80,11 +141,12 @@