diff --git a/professor/professor.html b/professor/professor.html index d66e00c..f5ba3ff 100644 --- a/professor/professor.html +++ b/professor/professor.html @@ -44,7 +44,7 @@ - + diff --git a/professor/script.js b/professor/script.js index 256ade2..98fce30 100644 --- a/professor/script.js +++ b/professor/script.js @@ -35,6 +35,9 @@ function fillLineInfo(line_json) { } async function submit() { + document.getElementById("update_indicator").innerText = "⭯" + + const new_transcription = document.getElementById("new_transcription").value; const new_speakers = await Promise.all(document.getElementById("speaker_input").value .trim() @@ -68,7 +71,13 @@ async function submit() { 'Content-Type': 'application/json' }, body: JSON.stringify({transcription: new_transcription, speakers: new_speakers}) - }) + }).then(response => { + if (response.ok) { + document.getElementById("update_indicator").innerText = "\u2714\ufe0f" + } else { + document.getElementById("update_indicator").innerText = "\u2716\ufe0f️" + } + }) } $(function () { diff --git a/professor/style.less b/professor/style.less index d18f72c..b6a5093 100644 --- a/professor/style.less +++ b/professor/style.less @@ -49,4 +49,11 @@ label { button { margin-top: 5px; margin-bottom: 5px; +} + +#update_indicator { + width: 1.3em; + height: 1.3em; + margin-left: 1em; + vertical-align: middle; } \ No newline at end of file