feat: add file upload progress toast with per-file tracking (#93)
Replaced the hidden dropzone-only progress bar with a floating upload toast that appears at the bottom-right corner whenever files are being uploaded (button or drag-and-drop). Features: - Per-file progress bar with real byte-level tracking via XHR - Spinning icon while uploading, green check on success, red on error - Overall progress bar and file counter in the footer - Auto-hides 4 seconds after all uploads complete - Dismiss button to minimise the toast - Works for both file and folder uploads - i18n keys added to all 8 locale files - Service worker cache bumped to v3
This commit is contained in:
@@ -3472,4 +3472,133 @@ html[dir='rtl'] .fa-arrow-left::before {
|
||||
html[dir='rtl'] .fa-sign-out-alt {
|
||||
-webkit-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
Upload Progress Toast
|
||||
============================================================================ */
|
||||
.upload-toast {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
width: 360px;
|
||||
max-height: 400px;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 30px rgba(0,0,0,0.15);
|
||||
z-index: 10000;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
font-family: inherit;
|
||||
animation: uploadToastSlideIn 0.3s ease-out;
|
||||
}
|
||||
.upload-toast.visible {
|
||||
display: flex;
|
||||
}
|
||||
@keyframes uploadToastSlideIn {
|
||||
from { transform: translateY(20px); opacity: 0; }
|
||||
to { transform: translateY(0); opacity: 1; }
|
||||
}
|
||||
.upload-toast-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
background: #ff5e3a;
|
||||
color: #fff;
|
||||
}
|
||||
.upload-toast-title {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
}
|
||||
.upload-toast-close {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0 4px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.upload-toast-close:hover { opacity: 1; }
|
||||
|
||||
.upload-toast-body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 8px 0;
|
||||
max-height: 260px;
|
||||
}
|
||||
.upload-toast-file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 16px;
|
||||
gap: 10px;
|
||||
}
|
||||
.upload-toast-file-icon {
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.upload-toast-file-icon.done { color: #34c759; }
|
||||
.upload-toast-file-icon.error { color: #ff3b30; }
|
||||
.upload-toast-file-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.upload-toast-file-name {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.upload-toast-file-bar {
|
||||
height: 3px;
|
||||
background: #eee;
|
||||
border-radius: 2px;
|
||||
margin-top: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.upload-toast-file-fill {
|
||||
height: 100%;
|
||||
background: #ff5e3a;
|
||||
width: 0%;
|
||||
transition: width 0.2s ease;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.upload-toast-file-fill.done { background: #34c759; }
|
||||
.upload-toast-file-fill.error { background: #ff3b30; }
|
||||
.upload-toast-file-pct {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
flex-shrink: 0;
|
||||
width: 38px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.upload-toast-footer {
|
||||
padding: 10px 16px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
.upload-toast-overall-bar {
|
||||
height: 4px;
|
||||
background: #eee;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.upload-toast-overall-fill {
|
||||
height: 100%;
|
||||
background: #ff5e3a;
|
||||
width: 0%;
|
||||
transition: width 0.25s ease;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.upload-toast-stats {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
}
|
||||
Reference in New Issue
Block a user