feat: Stimme als Popover mit Vorschau im Chat-Kopf (CHAT-01, #1122)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 08:05:12 +01:00
parent 5edc1aa3ae
commit 518fb59f2a
3 changed files with 11 additions and 2 deletions

View File

@ -118,7 +118,9 @@ pub(super) async fn page(State(state): State<Arc<AppState>>, headers: HeaderMap)
let stimme_kopf = if sprachmodelle.is_empty() {
String::new()
} else {
"<label>Stimme <select id=\"chat-stimme\"><option value=\"\">(zuerst Sprachausgabe wählen)</option></select></label>".to_string()
"<details class=\"stimmen-popover\" id=\"chat-stimmen-popover\"><summary>Stimme</summary>\
<label>Stimme <select id=\"chat-stimme\"><option value=\"\">(zuerst Sprachausgabe wählen)</option></select></label>\
<button class=\"sm\" type=\"button\" id=\"chat-stimme-vorschau\">Vorschau</button></details>".to_string()
};
format!(
"<section class=\"card\" id=\"chat\">\
@ -924,6 +926,9 @@ const CHAT_JS: &str = r#"(function () {
}
if (vorlesenStopp) { vorlesenStopp.addEventListener("click", stoppeVorlesen); }
// CHAT-01: Vorschau der gewählten Stimme mit einem festen kurzen Satz.
var vorschau = document.getElementById("chat-stimme-vorschau");
if (vorschau) { vorschau.addEventListener("click", function () { vorlesen("Dies ist eine Vorschau der gewählten Stimme."); }); }
window.NexusVorlesen = { saetze: saetze, bereinigen: bereinigen, protokoll: protokoll };
function sekunden(seit) {