From 74dd5b30e3da0e7588ef5f09fb4f9a82769f22ab Mon Sep 17 00:00:00 2001 From: balex Date: Tue, 3 Mar 2026 20:14:58 +0100 Subject: [PATCH] filename --- src/public/css/style.css | 3 +++ src/public/index.html | 2 +- src/public/js/app.js | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/public/css/style.css b/src/public/css/style.css index 41b33d1..0562300 100644 --- a/src/public/css/style.css +++ b/src/public/css/style.css @@ -270,6 +270,9 @@ body { .btn-primary:hover { filter: brightness(1.1); } .btn-primary:disabled { filter: none; } +.btn-download { color: var(--success); border-color: var(--success); font-size: 16px; } +.btn-download:not(:disabled):hover { background: rgba(48, 209, 88, 0.12); } + /* ── Feedback ── */ .feedback-box { background: var(--surface); diff --git a/src/public/index.html b/src/public/index.html index f0a8699..f6a17e6 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -62,7 +62,7 @@
- +
diff --git a/src/public/js/app.js b/src/public/js/app.js index 70a10a4..cd5e28b 100644 --- a/src/public/js/app.js +++ b/src/public/js/app.js @@ -253,7 +253,8 @@ downloadBtn.addEventListener('click', () => { const topic = (state.currentTopic?.name || 'antwort').replace(/[^\w]/g, '_'); const now = new Date(); const ext = EXT_MAP[audioBlob.type.split(';')[0]] || 'webm'; - const filename = `${topic}_q${state.currentIndex + 1}_${now.getDate()}-${now.getMonth() + 1}.${ext}`; + const ms5 = String(Date.now()).slice(-5); + const filename = `${topic}_q${state.currentIndex + 1}_${now.getDate()}-${now.getMonth() + 1}_${ms5}.${ext}`; const url = URL.createObjectURL(audioBlob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click();