From 7341ab52d1aa8eb2ea0905f863e2e2a3c172dae0 Mon Sep 17 00:00:00 2001 From: DemonGatanjieu <207458273+DemonGatanjieu@users.noreply.github.com> Date: Sat, 17 Oct 2026 21:38:37 +0800 Subject: [PATCH] Make the modes' editable numbers read as values, the box only on hover A bordered input pulled the eye from "15 -> 10". The number now looks like plain bold text with a dashed underline; the box shows on hover or while typing, without spin arrows (they covered the digits). The old value is a little brighter so the change reads as one line. Co-Authored-By: Claude Opus 5.5 --- web/modules/locales.js | 2 ++ web/modules/ui_tts_preset_switch.js | 1 + web/styles.css | 2 +- web/styles/12-tts-setup.css | 32 ++++++++++++++++++++++++++++- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/web/modules/locales.js b/web/modules/locales.js index 8862fa9..3793564 100644 --- a/web/modules/locales.js +++ b/web/modules/locales.js @@ -2293,6 +2293,7 @@ export const i18n = { ttsFeelYourDefault: "你的默认({name})", ttsFeelIsDefault: "这就是你的默认,其他档都拿它来比。", ttsFeelNumbers: "看具体数字(和{base}比:top_k、temperature…)", + ttsFeelEditHint: "点一下就能改,改完马上存进这一档", ttsListen: "▶ 试听这一档", ttsListenAgain: "▶ 再听一次", ttsListenMaking: "生成中…", @@ -4972,6 +4973,7 @@ export const i18n = { ttsFeelYourDefault: "your default ({name})", ttsFeelIsDefault: "This is your default; the others are compared with it.", ttsFeelNumbers: "The numbers (against {base}: top_k, temperature…)", + ttsFeelEditHint: "Click to change; it is saved into this preset at once", ttsListen: "▶ Listen to this one", ttsListenAgain: "▶ Play again", ttsListenMaking: "Making it…", diff --git a/web/modules/ui_tts_preset_switch.js b/web/modules/ui_tts_preset_switch.js index a04a6a1..96d2efd 100644 --- a/web/modules/ui_tts_preset_switch.js +++ b/web/modules/ui_tts_preset_switch.js @@ -45,6 +45,7 @@ function valueRow(key, before, now, { builtin, onEdit }) { if (onEdit) { const input = numberInput(key, now, onEdit); input.dataset.param = key; + input.title = t('ttsFeelEditHint'); values.append(input); } else { values.append(el('strong', '', brief(now))); diff --git a/web/styles.css b/web/styles.css index 9e4b812..3f72307 100644 --- a/web/styles.css +++ b/web/styles.css @@ -10,7 +10,7 @@ @import url("./styles/09-prompt-drawers.css?v=20261007-theme-2"); @import url("./styles/10-model-sources.css?v=20261007-theme-2"); @import url("./styles/11-audio-studio.css?v=20261017-tts-versions"); -@import url("./styles/12-tts-setup.css?v=20261017-feel2"); +@import url("./styles/12-tts-setup.css?v=20261017-feel4"); @import url("./styles/13-script-director.css?v=20261017-modes"); @import url("./styles/14-version-manager.css?v=20261007-theme-2"); @import url("./styles/15-shell-rail.css?v=20261016-remote-3"); diff --git a/web/styles/12-tts-setup.css b/web/styles/12-tts-setup.css index 01da5df..4316cc1 100644 --- a/web/styles/12-tts-setup.css +++ b/web/styles/12-tts-setup.css @@ -175,9 +175,39 @@ font-size: 12px; } +.anomalous-tts-switch-nums > .is-now { + color: var(--amb-text-soft); +} + +/* An editable number reads as the value itself: a dashed underline says it can be changed, + the box appears only on hover or while typing, so "15 → 10" stays one line to read. + No spin arrows (they covered the digits); typing and the arrow keys change it. */ .anomalous-tts-switch-nums .anomalous-tts-number { - width: 56px; + width: 52px; min-width: 0; + padding: 1px 4px; + border: 1px solid transparent; + border-bottom: 1px dashed var(--amb-border-strong); + border-radius: 4px; + background: transparent; + color: var(--amb-text-main); + font: inherit; + font-weight: 600; + text-align: right; + -moz-appearance: textfield; +} + +.anomalous-tts-switch-nums .anomalous-tts-number::-webkit-inner-spin-button, +.anomalous-tts-switch-nums .anomalous-tts-number::-webkit-outer-spin-button { + margin: 0; + -webkit-appearance: none; +} + +.anomalous-tts-switch-nums .anomalous-tts-number:hover, +.anomalous-tts-switch-nums .anomalous-tts-number:focus { + border-color: var(--amb-border-strong); + background: var(--amb-bg-input); + outline: none; } /* Under the number, so a narrow column (the Script Director's side) keeps it whole. */