v69: слоги в таблице истории — hover жёлтым
This commit is contained in:
+17
-1
@@ -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('');
|
||||
|
||||
Reference in New Issue
Block a user