summaryrefslogtreecommitdiff
path: root/includes/components/emergency.inc
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-03-21 16:21:21 +0100
committerRaindropsSys <contact@minteck.org>2023-03-21 16:21:21 +0100
commit475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd (patch)
tree2cff46debf9c1e13892e7babff9deb6874ecb4b2 /includes/components/emergency.inc
parent7ccc2de87f9e25c715dc09b9aba4eb5c66f80424 (diff)
downloadpluralconnect-475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd.tar.gz
pluralconnect-475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd.tar.bz2
pluralconnect-475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd.zip
Updated 26 files and added 1074 files (automated)
Diffstat (limited to 'includes/components/emergency.inc')
-rw-r--r--includes/components/emergency.inc31
1 files changed, 19 insertions, 12 deletions
diff --git a/includes/components/emergency.inc b/includes/components/emergency.inc
index 5490985..ffa19d6 100644
--- a/includes/components/emergency.inc
+++ b/includes/components/emergency.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">
@@ -50,7 +55,7 @@
</div>
<div class="alert alert-warning">
- This emergency alert system is designed to make sure a loved one can get in touch with you as soon as possible. Therefore, it will emit sudden alerts, and may surprise somecreature if e.g. they are sleeping. Keep that in mind.
+ This emergency alert system is designed to make sure a loved one can get in touch with you as soon as possible. Therefore, it will emit sudden alerts, and may surprise somepony if e.g. they are sleeping. Keep that in mind.
</div>
<p>
@@ -64,7 +69,7 @@
</div>
</div>
-<div class="modal fade" id="turn-off">
+<div class="modal" id="turn-off">
<div class="modal-dialog">
<div class="modal-content">
@@ -103,10 +108,12 @@
<script>
window.alertInterval = null;
- window.alertIntervalCounter = 15;
window.alertDisablerCounter = 9;
window.alertDisablerEnabled = false;
window.alertDisablerCounterInterval = null;
+ window.alertInterval = null;
+ window.alertIntervalAmount = 15;
+ window.alertIntervalCounter = window.alertIntervalAmount;
setInterval(() => {
if (document.getElementById("turn-off").offsetWidth > 0 || document.getElementById("turn-off").offsetHeight > 0) {
@@ -142,23 +149,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/emergency").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/emergency-real").then(() => {
- window.alertIntervalCounter = 15;
- document.getElementById("next-notification").innerText = "15 seconds";
+ window.alertIntervalCounter = window.alertIntervalAmount;
+ document.getElementById("next-notification").innerText = window.alertIntervalAmount + " seconds";
})
}
}