Feat: Drag & Drop MP3/WAV Upload mit Progress-Tracking
Backend: - multer reaktiviert (war auskommentiert) mit diskStorage + Collision-Handling - /api/upload (POST, admin-protected): bis zu 20 Dateien gleichzeitig - MP3/WAV-Filter (50MB Limit), sofortige Hintergrund-Normalisierung nach Upload Frontend: - Globale window dragenter/dragleave/drop Listener mit Counter gegen false-positives - Drag-Overlay: Vollbild-Blur + animierter Drop-Zone (pulsierender Accent-Border, bouncing Icon) - Upload-Queue: floating Card bottom-right mit Per-Datei Progressbar + Status-Icons (sync-Animation beim Hochladen, check_circle grün, error rot) - Auto-Refresh der Soundliste + Analytics nach Upload - Auto-Dismiss der Queue nach 3.5s Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a61663166f
commit
52c86240af
4 changed files with 426 additions and 3 deletions
|
|
@ -1778,6 +1778,212 @@ input, select {
|
|||
}
|
||||
}
|
||||
|
||||
/* ────────────────────────────────────────────
|
||||
Drag & Drop Overlay
|
||||
──────────────────────────────────────────── */
|
||||
.drop-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, .78);
|
||||
backdrop-filter: blur(6px);
|
||||
-webkit-backdrop-filter: blur(6px);
|
||||
z-index: 300;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
animation: fade-in 120ms ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.drop-zone {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 64px 72px;
|
||||
border-radius: 24px;
|
||||
border: 2.5px dashed rgba(var(--accent-rgb), .55);
|
||||
background: rgba(var(--accent-rgb), .07);
|
||||
animation: drop-pulse 2.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes drop-pulse {
|
||||
0%, 100% {
|
||||
border-color: rgba(var(--accent-rgb), .45);
|
||||
box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
|
||||
}
|
||||
50% {
|
||||
border-color: rgba(var(--accent-rgb), .9);
|
||||
box-shadow: 0 0 60px 12px rgba(var(--accent-rgb), .12);
|
||||
}
|
||||
}
|
||||
|
||||
.drop-icon {
|
||||
font-size: 64px;
|
||||
color: var(--accent);
|
||||
animation: drop-bounce 1.8s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes drop-bounce {
|
||||
0%, 100% { transform: translateY(0); }
|
||||
50% { transform: translateY(-8px); }
|
||||
}
|
||||
|
||||
.drop-title {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: var(--text-normal);
|
||||
letter-spacing: -.3px;
|
||||
}
|
||||
|
||||
.drop-sub {
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* ────────────────────────────────────────────
|
||||
Upload Queue (floating card)
|
||||
──────────────────────────────────────────── */
|
||||
.upload-queue {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
width: 340px;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid rgba(255, 255, 255, .09);
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 8px 40px rgba(0, 0, 0, .45);
|
||||
z-index: 200;
|
||||
overflow: hidden;
|
||||
animation: slide-up 200ms cubic-bezier(.16,1,.3,1);
|
||||
}
|
||||
|
||||
@keyframes slide-up {
|
||||
from { opacity: 0; transform: translateY(16px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.uq-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 14px;
|
||||
background: rgba(var(--accent-rgb), .12);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, .06);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.uq-header .material-icons { color: var(--accent); }
|
||||
|
||||
.uq-close {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: rgba(255,255,255,.06);
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: background var(--transition), color var(--transition);
|
||||
}
|
||||
.uq-close:hover { background: rgba(255,255,255,.14); color: var(--text-normal); }
|
||||
|
||||
.uq-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.uq-item {
|
||||
display: grid;
|
||||
grid-template-columns: 20px 1fr auto 18px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.uq-item + .uq-item {
|
||||
border-top: 1px solid rgba(255, 255, 255, .04);
|
||||
}
|
||||
|
||||
.uq-file-icon {
|
||||
font-size: 18px;
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.uq-info {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.uq-name {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: var(--text-normal);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.uq-size {
|
||||
font-size: 10px;
|
||||
color: var(--text-faint);
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.uq-progress-wrap {
|
||||
grid-column: 1 / -1;
|
||||
height: 3px;
|
||||
background: rgba(255, 255, 255, .07);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Vertikaler layout-Trick: progress bar als extra row nach den anderen */
|
||||
.uq-item {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.uq-progress-wrap {
|
||||
width: 100%;
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.uq-progress-bar {
|
||||
height: 100%;
|
||||
background: var(--accent);
|
||||
border-radius: 2px;
|
||||
transition: width 120ms ease;
|
||||
}
|
||||
|
||||
.uq-status-icon { font-size: 16px; }
|
||||
.uq-status-waiting .uq-status-icon { color: var(--text-faint); }
|
||||
.uq-status-uploading .uq-status-icon {
|
||||
color: var(--accent);
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
.uq-status-done .uq-status-icon { color: var(--green); }
|
||||
.uq-status-error .uq-status-icon { color: var(--red); }
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.uq-error {
|
||||
grid-column: 2 / -1;
|
||||
font-size: 10px;
|
||||
color: var(--red);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* ────────────────────────────────────────────
|
||||
Utility
|
||||
──────────────────────────────────────────── */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue