Browse Source

visible countdown

Davide Alberani 5 years ago
parent
commit
d9740938b9
3 changed files with 6 additions and 1 deletions
  1. 4 0
      static/css/sb.css
  2. 1 1
      static/index.html
  3. 1 0
      static/js/sb.js

+ 4 - 0
static/css/sb.css

@@ -29,6 +29,10 @@
     z-index: 10000;
 }
 
+#sb-countdown {
+    min-width: 20px;
+}
+
 .btn {
     margin-right: 10px;
 }

+ 1 - 1
static/index.html

@@ -34,7 +34,7 @@
 
             <div class="row">
                 <div id="sb-message">
-                    <span id="sb-message-text">will be gone in few seconds!</span>
+                    <span id="sb-message-text">will be gone in few seconds! <span id="sb-countdown">&nbsp;</span></span>
                 </div>
                 <div id="canvas-container">
                     <video id="sb-video" autoplay="true" muted="muted"></video>

+ 1 - 0
static/js/sb.js

@@ -103,6 +103,7 @@ function cancelPhoto() {
 
 
 function updateSendCountdown() {
+    document.querySelector("#sb-countdown").innerText = "" + countdown.seconds;
     console.log("deleting photo in " + countdown.seconds + " seconds");
 }