Name the profile default in the reset wording

This commit is contained in:
Fisto
2026-09-22 19:48:23 +02:00
parent a20a7de93f
commit 63def53f28
3 changed files with 18 additions and 6 deletions
+5 -3
View File
@@ -41,11 +41,13 @@ mobile draft at 390px.
cap, one attempt) run after every walk in both modes. Live run `...-20260916090722`:
`previewed: 2`; thumbs served over `/api/media/<scrape>/<item>/thumb` (200).
- [x] C82 Double-click resets in the voice settings. Every slider in the TTS panel resets on
double-click: the voice-character profile sliders (to the engine default from the voice list),
expression (default, and the override is truly cleared so the label reads `default`), speed
double-click: the voice-character profile sliders (to the voice's **profile default**),
expression (the profile default, and the override is truly cleared so the label reads
`default`), speed
(1), pitch (0), volume (100), highpass (40), echo (off), and word gap (120 ms). Hints say so:
"within 2 snaps to default · double-click a slider to reset it" in Voice character and
"VOX / HEV · double-click resets" in Radio kit, plus a title on the profile sliders. Also
"VOX / HEV · double-click resets" in Radio kit. The profile and expression sliders show the
target in the tooltip, for example `Double-click to reset to the profile default (3)`. Also
fixed: the speech status and preferences now load at startup (`refreshAudio()`), so the panel
and settings show real values before the first open — the profile defaults were empty until
then, which would have made the profile reset do nothing. Verified in a browser; the UI smoke
+12 -2
View File
@@ -2145,7 +2145,7 @@ function buildProfileSliders() {
const slider = el("input", { type: "range", min: String(min), max: String(max), step: "1" });
slider.id = `tts-profile-${key}`;
slider.dataset.key = key;
slider.title = "Double-click to reset to the engine default";
slider.title = "Double-click to reset to the profile default";
const value = el("span", { class: "vk-mono vk-dim", text: "default" });
root.append(
@@ -2200,14 +2200,20 @@ function fillProfileControls() {
const slider = $(`#tts-profile-${key}`);
if (!slider) continue;
const engineDefault = state.profileDefaults?.[key];
if (typeof stored[key] === "number") {
slider.value = stored[key];
slider.dataset.dirty = "1";
} else {
const engineDefault = state.profileDefaults?.[key];
if (typeof engineDefault === "number") slider.value = engineDefault;
slider.dataset.dirty = "";
}
slider.title =
typeof engineDefault === "number"
? `Double-click to reset to the profile default (${engineDefault})`
: "Double-click to reset to the profile default";
const value = slider.parentElement?.querySelector(".vk-mono");
if (value) value.textContent = slider.dataset.dirty === "1" ? slider.value : "default";
}
@@ -2287,6 +2293,10 @@ function syncVoiceControls(voices, selected) {
const expressive = !!voice?.supportsExpression;
state.profileDefaults = voice?.profileDefaults ?? {};
state.expressionDefault = typeof voice?.expressionDefault === "number" ? voice.expressionDefault : null;
$("#tts-expression").title =
typeof state.expressionDefault === "number"
? `Double-click to reset to the profile default (${state.expressionDefault})`
: "Double-click to reset to the profile default";
if (expressive) fillProfileControls();
{
+1 -1
View File
@@ -568,7 +568,7 @@
<section class="vk-profile-section">
<div class="vk-section-head">
<span class="vk-rail-label vk-rail-label-flat">Voice character</span>
<span class="vk-mono vk-dim">within 2 snaps to default · double-click a slider to reset it</span>
<span class="vk-mono vk-dim">within 2 of the profile default snaps to default · double-click a slider to reset it</span>
</div>
<div id="tts-profile-sliders" class="vk-profile-grid"></div>
<div class="vk-profile-row">