filename
This commit is contained in:
@@ -270,6 +270,9 @@ body {
|
|||||||
.btn-primary:hover { filter: brightness(1.1); }
|
.btn-primary:hover { filter: brightness(1.1); }
|
||||||
.btn-primary:disabled { filter: none; }
|
.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 ── */
|
||||||
.feedback-box {
|
.feedback-box {
|
||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button class="btn" id="skip-btn">Überspringen</button>
|
<button class="btn" id="skip-btn">Überspringen</button>
|
||||||
<button class="btn" id="clear-btn">Löschen</button>
|
<button class="btn" id="clear-btn">Löschen</button>
|
||||||
<button class="btn" id="download-btn" disabled>⬇ Audio</button>
|
<button class="btn btn-download" id="download-btn" disabled>⬇ Audio</button>
|
||||||
<button class="btn btn-primary" id="check-btn" disabled>Überprüfen</button>
|
<button class="btn btn-primary" id="check-btn" disabled>Überprüfen</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -253,7 +253,8 @@ downloadBtn.addEventListener('click', () => {
|
|||||||
const topic = (state.currentTopic?.name || 'antwort').replace(/[^\w]/g, '_');
|
const topic = (state.currentTopic?.name || 'antwort').replace(/[^\w]/g, '_');
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const ext = EXT_MAP[audioBlob.type.split(';')[0]] || 'webm';
|
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 url = URL.createObjectURL(audioBlob);
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = url; a.download = filename; a.click();
|
a.href = url; a.download = filename; a.click();
|
||||||
|
|||||||
Reference in New Issue
Block a user