Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Add timer pop-up instructions
Browse files
chat_application/templates/room.html
CHANGED
|
@@ -12,6 +12,17 @@
|
|
| 12 |
</div>
|
| 13 |
</div>
|
| 14 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
<h1 id="home-header">Chat Room</h1>
|
| 16 |
<div id="room-subsection">
|
| 17 |
<div class="topic-header-row">
|
|
@@ -88,10 +99,16 @@
|
|
| 88 |
}
|
| 89 |
// Handler for the welcome modal
|
| 90 |
let welcomeModal = document.getElementById("welcome-modal");
|
|
|
|
| 91 |
const displayNameText = document.getElementById("displayNameText");
|
| 92 |
displayNameText.textContent = "{{ user }}";
|
| 93 |
// Show the modal instantly when the page loads
|
| 94 |
window.onload = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
welcomeModal.style.display = "block";
|
| 96 |
};
|
| 97 |
// Close the modal on OK
|
|
|
|
| 12 |
</div>
|
| 13 |
</div>
|
| 14 |
</div>
|
| 15 |
+
|
| 16 |
+
<div id="timer-modal" class="modal">
|
| 17 |
+
<div class="modal-content">
|
| 18 |
+
<h3>Start a Timer</h3>
|
| 19 |
+
<p><strong>Please start a timer for 20 minutes</strong>. At the 20 minute mark, you may click the button "End Chat Session" to continue with the study.</p>
|
| 20 |
+
<div class="modal-buttons">
|
| 21 |
+
<button class="modal-btn" id="timerOkBtn">I have set a timer for 20 minutes.</button>
|
| 22 |
+
</div>
|
| 23 |
+
</div>
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
<h1 id="home-header">Chat Room</h1>
|
| 27 |
<div id="room-subsection">
|
| 28 |
<div class="topic-header-row">
|
|
|
|
| 99 |
}
|
| 100 |
// Handler for the welcome modal
|
| 101 |
let welcomeModal = document.getElementById("welcome-modal");
|
| 102 |
+
let timerModal = document.getElementById("timer-modal");
|
| 103 |
const displayNameText = document.getElementById("displayNameText");
|
| 104 |
displayNameText.textContent = "{{ user }}";
|
| 105 |
// Show the modal instantly when the page loads
|
| 106 |
window.onload = function() {
|
| 107 |
+
timerModal.style.display = "block";
|
| 108 |
+
};
|
| 109 |
+
//timer pop-up
|
| 110 |
+
document.getElementById("timerOkBtn").onclick = function () {
|
| 111 |
+
timerModal.style.display = "none";
|
| 112 |
welcomeModal.style.display = "block";
|
| 113 |
};
|
| 114 |
// Close the modal on OK
|