summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-04-20 18:11:49 +0500
committerilotterytea <iltsu@alright.party>2025-04-20 18:11:49 +0500
commit1f4877e3a8d59a4a4fb20d175b69d5e8f3349e5c (patch)
tree11f030b9361ac064d0880329d753d5be066c9166
parente251ac263125403009388fd50edaf855c645a9b2 (diff)
upd: remove alert after 5 seconds
-rw-r--r--src/alert.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/alert.php b/src/alert.php
index eb67f77..62f1887 100644
--- a/src/alert.php
+++ b/src/alert.php
@@ -25,9 +25,15 @@ function display_alert()
$ok = substr($status, 0, 1) == '2';
echo '' ?>
- <div class="box row alert <?php echo $ok ? '' : 'red' ?>" style="gap:8px;">
+ <div class="box row alert <?php echo $ok ? '' : 'red' ?>" style="gap:8px;" id="alert-box">
<img src="/static/img/icons/<?php echo $ok ? 'yes' : 'no' ?>.png" alt="">
<p><b><?php echo $reason ?></b></p>
</div>
+ <script>
+ setTimeout(() => {
+ const alertBox = document.getElementById("alert-box");
+ alertBox.remove();
+ }, 5000);
+ </script>
<?php
} \ No newline at end of file