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
This commit is contained in:
2026-03-03 22:15:06 +08:00
parent 2c8664b41e
commit 7b32191987
4 changed files with 329 additions and 67 deletions

View File

@@ -66,7 +66,12 @@ const remainingPercent = computed(() => {
>
<div class="user-card">
<div class="user-card__mobile">{{ maskedMobile }}</div>
<div class="user-card__quota">剩余额度 {{ remainingPercent }}%</div>
<div class="user-card__quota">
<span>剩余额度 {{ userStore.remainingPoints }} </span>
<div class="quota-progress">
<div class="quota-progress__bar" :style="{ width: remainingPercent + '%' }"></div>
</div>
</div>
</div>
</router-link>
</aside>
@@ -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;
}
</style>