Move save/import buttons to bottom-right of each card/panel

Inspector opt-groups: Save crop, Save text, Save style variation, Save volume
each moved into an .opt-group-footer div (flex, justify-content: flex-end).

Get Voices scraper cards: Import this voice moved into .vs-import-footer
(full-width row, right-aligned) below the pill/link row.

ElevenLabs cards: ↓ Clone moved into .el-vc-footer (full-width, right-aligned)
with accent fill; ▶ Play stays inline with the body.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-05-26 13:18:05 +02:00
parent ff783a8ab9
commit 7f734b42b6
2 changed files with 27 additions and 14 deletions

View File

@ -854,11 +854,11 @@ function renderGetVoices() {
${audio}
<div class="voice-source-actions">
${type}${language}${gender}
${getVoice}
${audioLink}
<a class="btn-secondary" href="${escHtml(item.page_url || item._sourceHomepage || '#')}" target="_blank" rel="noopener">Source page</a>
<button class="btn-secondary copy-source-url" data-url="${escHtml(item.audio_url || item.page_url || '')}">Copy URL</button>
</div>
${getVoice ? `<div class="vs-import-footer">${getVoice}</div>` : ''}
</div>`;
}).join('') + (more > 0 ? `<div class="card"><p class="note">${more} more matches. Narrow the search or filters to see them.</p></div>` : '');
}
@ -4450,9 +4450,11 @@ function makeVoiceRow(v) {
<div class="opt-field"><label>End</label><input class="opt-end" type="number" step="0.01" value="0"></div>
<button class="btn-secondary opt-auto-trim">Auto trim</button>
<button class="btn-secondary opt-play">Play crop</button>
<button class="btn-primary opt-save-crop">Save crop</button>
<button class="btn-secondary opt-undo">Undo crop</button>
</div>
<div class="opt-group-footer">
<button class="btn-primary opt-save-crop">Save crop</button>
</div>
</div>
</div>
<div class="opt-group opt-text-panel open">
@ -4461,6 +4463,8 @@ function makeVoiceRow(v) {
<textarea class="opt-transcript" placeholder="Reference text">${escHtml(v.transcript || '')}</textarea>
<div class="opt-controls">
<button class="btn-secondary opt-recognize">Re-recognise text</button>
</div>
<div class="opt-group-footer">
<button class="btn-primary opt-save-text">Save text</button>
</div>
</div>
@ -4499,10 +4503,12 @@ function makeVoiceRow(v) {
<div class="opt-style-preview-box">
<div class="opt-controls">
<button class="btn-secondary opt-preview-style">Preview style</button>
<button class="btn-primary opt-save-style">Save style variation</button>
</div>
<audio class="opt-style-audio" controls></audio>
</div>
<div class="opt-group-footer">
<button class="btn-primary opt-save-style">Save style variation</button>
</div>
</div>
</div>
<div class="opt-group opt-maintenance open">
@ -4513,11 +4519,13 @@ function makeVoiceRow(v) {
<button class="btn-secondary opt-db-minus">-</button>
<button class="btn-secondary opt-db-plus">+</button>
<button class="btn-secondary opt-db-auto">Auto</button>
<button class="btn-primary opt-save-volume">Save volume</button>
<button class="btn-secondary opt-restart-tts">Restart TTS</button>
<button class="btn-secondary opt-rebenchmark">Rebenchmark this one</button>
<span class="opt-restart-note" hidden>Restart TTS before benchmarking.</span>
</div>
<div class="opt-group-footer">
<button class="btn-primary opt-save-volume">Save volume</button>
</div>
</div>
</div>
<div class="opt-status optimizer-workflow">Click the pencil to load waveform and tools.</div>
@ -6053,11 +6061,11 @@ loadSettings().then(() => {
<div class="el-vc-name">${nm}</div>
<div class="el-vc-tags">${tags}</div>
${desc ? `<div class="el-vc-desc">${_elEsc(desc)}</div>` : ''}
<div class="el-vc-meta">
<button class="el-play" title="Play preview" data-preview="${prev}"> Play</button>
</div>
</div>
<div class="el-vc-btns">
<button class="el-play" title="Play preview" data-preview="${prev}"></button>
${prev ? `<button class="el-clone" title="Import to Clone a Voice" data-preview="${prev}" data-name="${nm}">↓ Clone</button>` : ''}
</div>
${prev ? `<div class="el-vc-footer"><button class="el-clone" title="Import to Clone a Voice" data-preview="${prev}" data-name="${nm}">&#8595; Clone</button></div>` : ''}
</div>`;
}

View File

@ -647,6 +647,8 @@ code { background: var(--panel); border-radius: 4px; padding: 1px 5px; font-fami
.voice-source-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.voice-source-actions a, .voice-source-actions button { font-size: 12px; padding: 7px 9px; min-height: 32px; }
.voice-source-pill { border: 1px solid var(--border); color: var(--subtext); border-radius: 999px; padding: 3px 7px; font-size: 12px; }
.vs-import-footer { display: flex; justify-content: flex-end; padding-top: 4px; margin-top: -4px; border-top: 1px solid var(--border); }
.vs-import-footer .btn-primary { font-size: 12px; padding: 7px 12px; }
/* ── Integrations ───────────────────────────────────────────────────────── */
.integration-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@ -1156,6 +1158,7 @@ code { background: var(--panel); border-radius: 4px; padding: 1px 5px; font-fami
/* Body: smooth height transition */
.opt-group-body { overflow: hidden; }
.inspector-body .opt-group:not(.open) > .opt-group-body { display: none; }
.opt-group-footer { display: flex; justify-content: flex-end; padding: 8px 14px 12px; }
.inspector-body .opt-group canvas.opt-wave { display: block; width: 100%; height: 72px; background: var(--bg); }
.inspector-body .opt-group .opt-group-body > .opt-controls { padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
@ -1469,10 +1472,10 @@ code { background: var(--panel); border-radius: 4px; padding: 1px 5px; font-fami
@keyframes elSpin { to { transform: rotate(360deg); } }
.el-error { color: #e53e3e !important; }
.el-card-voice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); transition: background .12s; }
.el-card-voice { display: flex; align-items: stretch; gap: 10px; padding: 11px 13px 0; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); transition: background .12s; flex-wrap: wrap; }
.el-card-voice:hover { background: var(--panel); }
.el-vc-av { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--elh, 220), 52%, 52%); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; margin-top: 3px; }
.el-vc-body { flex: 1; min-width: 0; }
.el-vc-body { flex: 1; min-width: 0; padding-bottom: 10px; }
.el-vc-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.el-vc-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.el-tag { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: var(--panel); border: 1px solid var(--border); color: var(--subtext); white-space: nowrap; }
@ -1481,11 +1484,13 @@ code { background: var(--panel); border-radius: 4px; padding: 1px 5px; font-fami
.el-free { color: #38a169; border-color: #38a169; background: transparent; }
.el-feat { color: #d69e2e; border-color: #d69e2e; background: transparent; }
.el-clones { opacity: .7; }
.el-vc-desc { font-size: 11px; color: var(--subtext); line-height: 1.4; }
.el-vc-btns { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; padding-top: 2px; }
.el-play, .el-clone { border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 11px; padding: 4px 8px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s; font-family: inherit; }
.el-vc-desc { font-size: 11px; color: var(--subtext); line-height: 1.4; margin-bottom: 6px; }
.el-vc-meta { margin-top: 4px; }
.el-play { border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 11px; padding: 4px 10px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s; font-family: inherit; }
.el-play:hover { border-color: var(--accent); color: var(--accent); }
.el-clone:hover { border-color: #38a169; color: #38a169; }
.el-vc-footer { width: 100%; display: flex; justify-content: flex-end; padding: 6px 0 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.el-clone { border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: #fff; font-size: 12px; padding: 5px 12px; cursor: pointer; white-space: nowrap; transition: opacity .15s; font-family: inherit; font-weight: 600; }
.el-clone:hover { opacity: .85; }
.el-pager { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.el-pager-info { flex: 1; text-align: center; font-size: 12px; color: var(--subtext); }