v69: слоги в таблице истории — hover жёлтым

This commit is contained in:
“Naeel”
2026-05-22 19:01:50 +04:00
parent ceebfc5d58
commit 1f08e3a525
3 changed files with 36 additions and 52 deletions
+17 -1
View File
@@ -55,6 +55,22 @@ async function renderRecHistory() {
recs.map(r => {
const d = new Date(r.ts);
const time = d.toLocaleTimeString('ru-RU', {hour:'2-digit',minute:'2-digit'});
let trHTML = '';
if (r.transcription) {
trHTML = '<span style="color:#aaa;font-size:0.82em;margin:0 4px">' +
r.transcription.split(/\s+/).map(w => {
const sy = syllabifyIT(w);
if (sy.includes('-')) {
return sy.split('-').map(s =>
'<span style="cursor:pointer;padding:0 2px;border-radius:3px"' +
' onmouseover="this.style.background=\'#ffeb3b\'"' +
' onmouseout="this.style.background=\'\'">' + s + '</span>'
).join('<span style="color:#ccc">·</span>');
}
return w;
}).join(' ') +
'</span>';
}
return '<div class="recItem">' +
'<span style="cursor:pointer" onclick="document.getElementById(\'inputText\').value=\'' +
r.word.replace(/'/g, "\\'") + '\';ttsText=\'' + r.word.replace(/'/g, "\\'") + '\'">' + r.word + '</span>' +
@@ -62,7 +78,7 @@ async function renderRecHistory() {
'<button onclick="playRec(' + r.id + ')">▶</button>' +
'<button onclick="stereoRec(' + r.id + ')">🎧</button>' +
'<button onclick="compareRec(' + r.id + ')">📊</button>' +
(r.transcription ? '<span style="color:#aaa;font-size:0.82em;margin:0 4px">' + syllabifyPhrase(r.transcription) + '</span>' : '') +
trHTML +
'<button onclick="deleteRec(' + r.id + ')" style="background:#e44;padding:4px 8px">🗑</button>' +
'</div>';
}).join('');