Name the profile default in the reset wording
This commit is contained in:
+5
-3
@@ -41,11 +41,13 @@ mobile draft at 390px.
|
|||||||
cap, one attempt) run after every walk in both modes. Live run `...-20260916090722`:
|
cap, one attempt) run after every walk in both modes. Live run `...-20260916090722`:
|
||||||
`previewed: 2`; thumbs served over `/api/media/<scrape>/<item>/thumb` (200).
|
`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
|
- [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),
|
double-click: the voice-character profile sliders (to the voice's **profile default**),
|
||||||
expression (default, and the override is truly cleared so the label reads `default`), speed
|
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:
|
(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
|
"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
|
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
|
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
|
then, which would have made the profile reset do nothing. Verified in a browser; the UI smoke
|
||||||
|
|||||||
+12
-2
@@ -2145,7 +2145,7 @@ function buildProfileSliders() {
|
|||||||
const slider = el("input", { type: "range", min: String(min), max: String(max), step: "1" });
|
const slider = el("input", { type: "range", min: String(min), max: String(max), step: "1" });
|
||||||
slider.id = `tts-profile-${key}`;
|
slider.id = `tts-profile-${key}`;
|
||||||
slider.dataset.key = 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" });
|
const value = el("span", { class: "vk-mono vk-dim", text: "default" });
|
||||||
|
|
||||||
root.append(
|
root.append(
|
||||||
@@ -2200,14 +2200,20 @@ function fillProfileControls() {
|
|||||||
const slider = $(`#tts-profile-${key}`);
|
const slider = $(`#tts-profile-${key}`);
|
||||||
if (!slider) continue;
|
if (!slider) continue;
|
||||||
|
|
||||||
|
const engineDefault = state.profileDefaults?.[key];
|
||||||
|
|
||||||
if (typeof stored[key] === "number") {
|
if (typeof stored[key] === "number") {
|
||||||
slider.value = stored[key];
|
slider.value = stored[key];
|
||||||
slider.dataset.dirty = "1";
|
slider.dataset.dirty = "1";
|
||||||
} else {
|
} else {
|
||||||
const engineDefault = state.profileDefaults?.[key];
|
|
||||||
if (typeof engineDefault === "number") slider.value = engineDefault;
|
if (typeof engineDefault === "number") slider.value = engineDefault;
|
||||||
slider.dataset.dirty = "";
|
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");
|
const value = slider.parentElement?.querySelector(".vk-mono");
|
||||||
if (value) value.textContent = slider.dataset.dirty === "1" ? slider.value : "default";
|
if (value) value.textContent = slider.dataset.dirty === "1" ? slider.value : "default";
|
||||||
}
|
}
|
||||||
@@ -2287,6 +2293,10 @@ function syncVoiceControls(voices, selected) {
|
|||||||
const expressive = !!voice?.supportsExpression;
|
const expressive = !!voice?.supportsExpression;
|
||||||
state.profileDefaults = voice?.profileDefaults ?? {};
|
state.profileDefaults = voice?.profileDefaults ?? {};
|
||||||
state.expressionDefault = typeof voice?.expressionDefault === "number" ? voice.expressionDefault : null;
|
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();
|
if (expressive) fillProfileControls();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -568,7 +568,7 @@
|
|||||||
<section class="vk-profile-section">
|
<section class="vk-profile-section">
|
||||||
<div class="vk-section-head">
|
<div class="vk-section-head">
|
||||||
<span class="vk-rail-label vk-rail-label-flat">Voice character</span>
|
<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>
|
||||||
<div id="tts-profile-sliders" class="vk-profile-grid"></div>
|
<div id="tts-profile-sliders" class="vk-profile-grid"></div>
|
||||||
<div class="vk-profile-row">
|
<div class="vk-profile-row">
|
||||||
|
|||||||
Reference in New Issue
Block a user