diff options
Diffstat (limited to 'includes/components/wakeup.inc')
-rw-r--r-- | includes/components/wakeup.inc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/includes/components/wakeup.inc b/includes/components/wakeup.inc index 587e705..d7bceee 100644 --- a/includes/components/wakeup.inc +++ b/includes/components/wakeup.inc @@ -22,9 +22,14 @@ .btn-close { filter: invert(1); } + + #btn-on.disabled, #btn-off.disabled { + opacity: .5; + pointer-events: none; + } </style> -<div class="modal fade" id="turn-on"> +<div class="modal" id="turn-on"> <div class="modal-dialog"> <div class="modal-content"> @@ -39,7 +44,7 @@ <hr> <div class="alert alert-warning"> - This alert system is designed to emit sudden alerts, and may surprise somecreature if e.g. they are sleeping. Keep that in mind. + This alert system is designed to emit sudden alerts, and may surprise somepony if e.g. they are sleeping. Keep that in mind. </div> <p> @@ -55,7 +60,8 @@ <script> window.alertInterval = null; - window.alertIntervalCounter = 15; + window.alertIntervalAmount = 5; + window.alertIntervalCounter = window.alertIntervalAmount; function sendNotification() { window.alertIntervalCounter = -1; @@ -63,23 +69,23 @@ if (document.getElementById("test-mode").checked) { document.getElementById("next-notification").innerText = "now"; if (document.getElementById("fake-requests").checked) { - window.alertIntervalCounter = 15; - document.getElementById("next-notification").innerText = "15 seconds"; + window.alertIntervalCounter = window.alertIntervalAmount; + document.getElementById("next-notification").innerText = window.alertIntervalAmount + " seconds"; } else { window.fetch("/api/wakeup").then(() => { - window.alertIntervalCounter = 15; - document.getElementById("next-notification").innerText = "15 seconds"; + window.alertIntervalCounter = window.alertIntervalAmount; + document.getElementById("next-notification").innerText = window.alertIntervalAmount + " seconds"; }) } } else { document.getElementById("next-notification").innerText = "now"; if (document.getElementById("fake-requests").checked) { - window.alertIntervalCounter = 15; - document.getElementById("next-notification").innerText = "15 seconds"; + window.alertIntervalCounter = window.alertIntervalAmount; + document.getElementById("next-notification").innerText = window.alertIntervalAmount + " seconds"; } else { window.fetch("/api/wakeup-real").then(() => { - window.alertIntervalCounter = 15; - document.getElementById("next-notification").innerText = "15 seconds"; + window.alertIntervalCounter = window.alertIntervalAmount; + document.getElementById("next-notification").innerText = window.alertIntervalAmount + " seconds"; }) } } |