33 |
34 |
35 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/AudioPlayer/AudioTranscript.tsx:
--------------------------------------------------------------------------------
1 | import { createLiveTranscriptResult } from "../AudioTranscript/LiveTranstruct";
2 | import { toHHMMSS } from "./format-time";
3 | import { ReactEventHandler } from "react";
4 |
5 | export type AudioTranscriptPropos = {
6 | onClickLog: (log: createLiveTranscriptResult) => void;
7 | speechingText: JSX.Element;
8 | logs: createLiveTranscriptResult[];
9 | currentTime: number;
10 | };
11 |
12 | export function AudioTranscript(props: AudioTranscriptPropos) {
13 | const onClick: ReactEventHandler35 | 49 | {`${toHHMMSS(startTime)} --> ${toHHMMSS(endTime)} 50 | ${log.text}`} 51 |
52 | ); 53 | }); 54 | return ( 55 |{props.speechingText}
63 |
69 | {output}
70 |
71 | is in a , reset it's formatting to blend in */
310 | background: inherit;
311 | font-size: inherit;
312 | color: inherit;
313 | border: 0;
314 | padding: 0;
315 | margin: 0;
316 | }
317 |
318 | code pre {
319 | /* When is in a , reset it's formatting to blend in */
320 | display: inline;
321 | background: inherit;
322 | font-size: inherit;
323 | color: inherit;
324 | border: 0;
325 | padding: 0;
326 | margin: 0;
327 | }
328 |
329 | details {
330 | /* Make the look more "clickable" */
331 | padding: 0.6rem 1rem;
332 | background: var(--nc-bg-2);
333 | border: 1px solid var(--nc-bg-3);
334 | border-radius: 4px;
335 | }
336 |
337 | summary {
338 | /* Makes the look more like a "clickable" link with the pointer cursor */
339 | cursor: pointer;
340 | font-weight: bold;
341 | }
342 |
343 | details[open] {
344 | /* Adjust the padding while open */
345 | padding-bottom: 0.75rem;
346 | }
347 |
348 | details[open] summary {
349 | /* Adjust the padding while open */
350 | margin-bottom: 6px;
351 | }
352 |
353 | details[open] > *:last-child {
354 | /* Resets the bottom margin of the last element in the while is opened. This prevents double margins/paddings. */
355 | margin-bottom: 0;
356 | }
357 |
358 | dt {
359 | font-weight: bold;
360 | }
361 |
362 | dd::before {
363 | /* Add an arrow to data table definitions */
364 | content: "→ ";
365 | }
366 |
367 | hr {
368 | /* Reset the border of the
separator, then set a better line */
369 | border: 0;
370 | border-bottom: 1px solid var(--nc-bg-3);
371 | margin: 1rem auto;
372 | }
373 |
374 | fieldset {
375 | margin-top: 1rem;
376 | padding: 2rem;
377 | border: 1px solid var(--nc-bg-3);
378 | border-radius: 4px;
379 | }
380 |
381 | legend {
382 | padding: auto 0.5rem;
383 | }
384 |
385 | table {
386 | /* border-collapse sets the table's elements to share borders, rather than floating as separate "boxes". */
387 | border-collapse: collapse;
388 | width: 100%;
389 | }
390 |
391 | td,
392 | th {
393 | border: 1px solid var(--nc-bg-3);
394 | text-align: left;
395 | padding: 0.5rem;
396 | }
397 |
398 | th {
399 | background: var(--nc-bg-2);
400 | }
401 |
402 | tr:nth-child(even) {
403 | /* Set every other cell slightly darker. Improves readability. */
404 | background: var(--nc-bg-2);
405 | }
406 |
407 | table caption {
408 | font-weight: bold;
409 | margin-bottom: 0.5rem;
410 | }
411 |
412 | textarea {
413 | /* Don't let the