riderle commited on
Commit
789d3cf
·
1 Parent(s): 1b07428

Add timer pop-up instructions (#4)

Browse files

- Add timer pop-up instructions (8beec8a66e26f7d3988eba1720bb6f241f86a91e)
- Update chat_application/static/styles/styles.css (04d876421abe86b32765a8784e3a719212bebee7)

chat_application/static/styles/styles.css CHANGED
@@ -498,12 +498,12 @@ hr {
498
  background: #ccc;
499
  }
500
 
501
- #welcomeOkBtn {
502
  background: green;
503
  color: white;
504
  }
505
 
506
- #welcomeOkBtn:hover {
507
  background: #016601;
508
  }
509
 
 
498
  background: #ccc;
499
  }
500
 
501
+ #welcomeOkBtn, #timerOkBtn {
502
  background: green;
503
  color: white;
504
  }
505
 
506
+ #welcomeOkBtn:hover, #timerOkBtn:hover {
507
  background: #016601;
508
  }
509
 
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