Speakers in search

pull/414/head
HeNine 3 years ago
parent 26554883f2
commit 4682742c20

@ -94,6 +94,7 @@ def get_json():
"end_time": row.end_time.isoformat(), "end_time": row.end_time.isoformat(),
"end_bus_time": round_bus_time(row.start_time - app.bustime_start), "end_bus_time": round_bus_time(row.start_time - app.bustime_start),
"verifier": row.verifier, "verifier": row.verifier,
"speakers": row.names,
"text": row.transcription_line if row.transcription_line is not None else ""} for row in results]) "text": row.transcription_line if row.transcription_line is not None else ""} for row in results])

@ -8,14 +8,18 @@
align-items: start; align-items: start;
margin-bottom: 0.1em; margin-bottom: 0.1em;
padding: 0.1em; padding: 0.3em;
max-width: 50em; max-width: 50em;
background: #606060;
.line_start_time { .line_start_time {
color: lightgray; color: lightgray;
font-family: monospace; font-family: monospace;
font-size: smaller; font-size: smaller;
margin-top: 1.5ex;
grid-column: times; grid-column: times;
align-self: start; align-self: start;
} }
@ -39,10 +43,21 @@
margin-left: 0.3em; margin-left: 0.3em;
grid-column: text; grid-column: text;
grid-row: span 2; //grid-row: span 2;
}
.line_speakers {
font-family: @sans-serif;
font-size: small;
padding: 0.2em;
margin-left: 0.3em;
margin-top: 0.2em;
grid-column: text;
} }
} }
.line.verified { .line.verified {
background: #555; background: #575757;
} }

@ -46,10 +46,12 @@ function fillResults(results) {
line_div.classList.add("verified"); line_div.classList.add("verified");
} }
line_div.innerHTML = ` line_div.innerHTML = `
<div class="line_start_bus_time">${line.start_bus_time}</div> <div class="line_start_bus_time">${line.start_bus_time}</div>
<div class="line_text">${line.text}</div> <div class="line_speakers">${line.speakers == null ? "" : line.speakers.join(", ")}</div>
<div class="line_start_time">${line.start_time}</div> <div class="line_start_time">${line.start_time}</div>
<div class="line_text">${line.text}</div>
`; `;

Loading…
Cancel
Save