]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Move things over to a more bootstrap style
authorValerie Pond <redacted>
Tue, 10 Jan 2023 01:54:41 +0000 (01:54 +0000)
committerValerie Pond <redacted>
Tue, 10 Jan 2023 01:54:41 +0000 (01:54 +0000)
channels.php
css/unrealircd-admin.css
header.php
js/unrealircd-admin.js
misc/confirmation_modal.php [new file with mode: 0644]
spamfilter.php
tkl.php
users.php

index ae9e7a0c679b28f41b695dc99cea4f54f283618b..93be1626170581dd8d81e346d190bbc8bf57d4f4 100644 (file)
@@ -14,9 +14,9 @@ if (!empty($_POST))
 $channels = $rpc->channel()->getAll();
 
 ?>
-
-<table class="table table-striped">
-<thead>
+<h4>Channels Overview</h4>
+<table class="table table-responsive caption-top table-striped">
+       <thead class="table-primary">
        <th>Name</th>
        <th>Created</th>
        <th>User count</th>
index 9b5f9e1c7578d934f9126147c1fa0a10d8fe9dff..698fdc80a3279ffdaeac1909ecd5a74db29fabd2 100644 (file)
@@ -1,3 +1,7 @@
+table {
+       font-size: 96%;
+}
+
 .unrealircd_overview {
        font-family: arial, sans-serif;
        border-collapse: collapse;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
 }
 
+.curvy {
+       border-radius: 7px;
+}
+
+
+.form-control {
+       height: 10px;
+       margin: 5px;
+}
+
+.short-form-control {
+       width: 70%;
+}
+
 .nav-item {
        margin-left: 2px;
        margin-right: 2px;
 .input_text {
        border-radius: 7px;
 }
-select {
-       border-radius: 7px;
-}
 
-.thuf {
-       border-bottom-left-radius: 10px;
-}
-
-.thuffer {
-       border-bottom-right-radius: 10px;
-}
 .filter-fields {
        height: 30px;
        width: 400px;
@@ -86,27 +94,6 @@ select {
        border-radius: 7px;
 }
 
-.secure-connection {
-       color: darkgreen;
-       border: 3px solid darkgreen;
-       background-color: rgba(0, 255, 0, 0.1);
-}
-
-.operclass-label {
-       color:brown;
-       border: 3px solid brown;
-       background-color: rgba(255, 166, 0, 0.247);
-}
-.bluelabel {
-       color: blue;
-       border: 3px solid darkblue;
-       background-color: rgba(131, 78, 255, 0.295);
-}
-.redlabel {
-       color: darkred;
-       border: 3px solid darkred;
-       background-color: rgba(255, 78, 78, 0.295);
-}
 
 .align_label {
        width: 80px;
@@ -120,21 +107,6 @@ select {
        text-align: right;
 }
 
-.label {
-       white-space: nowrap;
-       font-family: 'Heebo', sans-serif;
-       font-size: 0.65rem;
-       font-weight: 500;
-       letter-spacing: 0.025rem;
-       font-style: normal;
-       text-transform: uppercase;
-       border-radius: 7px;
-       -webkit-border-radius: 1rem;
-       -moz-border-radius: 1rem;
-       padding: 0.20rem 0.50rem;
-       border-style: solid;
-       
-       }
 textarea {
        height: 30px;
        width: 400px;
@@ -142,63 +114,10 @@ textarea {
        margin: 8px 0;
        border-radius: 7px;
   }
-table {
-       border-collapse: collapse;
-       margin: 25px 0;
-       font-size: 0.9em;
-       font-family: sans-serif;
-       min-width: 400px;
-       box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
-}
 
-td {
-       text-align: left;
-       padding: 8px;
-}
 
-th {
-       text-align: left;
-       padding: 8px;
-       background-color: #4B86EE;
-       color: white;
-}
 
-th:first-of-type {
-       border-top-left-radius: 10px;
-       color: white;
-}
 
-th:last-of-type {
-       border-top-right-radius: 10px;
-       color: white;
-}
-
-tr:last-of-type td:first-of-type {
-       border-bottom-left-radius: 10px;
-
-}
-
-tr:last-of-type td:last-of-type {
-       border-bottom-right-radius: 10px;
-}
-
-tr:nth-child(even) {
-       background-color: #bec8d3;
-}
-
-tr:nth-child(odd) {
-       background-color: whitesmoke;
-}
-
-html {
-       height: 100%;
-       /* for the page to take full window height */
-       box-sizing: border-box;
-
-       /* to have the footer displayed at the bottom of the page without scrolling */
-       font-family: arial, sans-serif;
-
-}
 
 *,
 *:before,
@@ -230,15 +149,6 @@ html {
        color: #4B86EE;
 }
 
-.row {
-       display: flex;
-}
-
-.column {
-       flex: 50%;
-       padding: 5px;
-}
-
 .topnav {
        background-color: #333;
        overflow: hidden;
@@ -448,28 +358,6 @@ body {
 
 
 
-.success {
-       padding: 10px;
-       background-color: #208120;
-       /* Red */
-       color: white;
-       margin-bottom: 15px;
-       margin-top: 15px;
-       border-radius: 7px;
-       width: 100%;
-}
-
-.information {
-       padding: 10px;
-       background-color: #245788;
-       /* Red */
-       color: white;
-       margin-bottom: 15px;
-       margin-top: 15px;
-       border-radius: 7px;
-       width: 100%;
-}
-
 /* The close button */
 .closebtn {
        margin-left: 15px;
index 30f0535bcb03663d93996c61e76d6bc5588c8c8c..7e4ec17c8d52a0a03a32d767195022932dc68431 100644 (file)
@@ -24,6 +24,7 @@
                <ul class="nav navbar-nav">
                        <a class="navbar-brand" href="index.php">UnrealIRCd Admin Panel</a>
 <?php
+
 foreach($pages as $name=>$page)
 {
        $class = "class=\"nav-item\"";
index c4cf97425bd9e94ea1d491ec835a64ebd7f3c2dd..47ffc1306b19038ddb0d791fd37d5d374bd3c6de 100644 (file)
@@ -39,4 +39,6 @@ function toggle_sf(source) {
     for (var i = 0, n = checkboxes.length; i < n; i++) {
         checkboxes[i].checked = source.checked;
     }
-}
\ No newline at end of file
+}
+
+
diff --git a/misc/confirmation_modal.php b/misc/confirmation_modal.php
new file mode 100644 (file)
index 0000000..224bbd3
--- /dev/null
@@ -0,0 +1,7 @@
+
+<script>
+    
+    $("#myModal").on('shown.bs.modal', function(){
+        $("#CloseButton").focus();
+    });
+</script>
\ No newline at end of file
index 2d242644ced907f608447eb2a227b42d6c907e28..37a62982e85d9e1703989f45a3f29782b78c7ef4 100644 (file)
@@ -205,7 +205,8 @@ $spamfilter = $rpc->spamfilter()->getAll();
                        <div class="align_right_button_tkl_add"><input class="cute_button" type="submit" id="submit" value="Submit"></div>
                </form>
        </div>
-       <table class='users_overview'>
+       <table class="table table-responsive caption-top table-striped">
+       <thead class="table-primary">
        <form action="spamfilter.php" method="post">
        <th><input type="checkbox" label='selectall' onClick="toggle_sf(this)" />Select all</th>
        <th>Mask</th>
@@ -219,6 +220,7 @@ $spamfilter = $rpc->spamfilter()->getAll();
        <th>Action Duration</th>
        <th>Target</th>
        <th>Reason</th>
+                               </thead>
        
        <?php
                foreach($spamfilter as $sf)
diff --git a/tkl.php b/tkl.php
index 9089c87c8d9fc7894e56b43bb32c0fc50e6808d5..24f81c0c3d30c22217af4c9f6f1f3b624cf891f9 100644 (file)
--- a/tkl.php
+++ b/tkl.php
@@ -149,7 +149,8 @@ $tkl = $rpc->serverban()->getAll();
                                        <div class="align_right_button_tkl_add"><input class="cute_button" type="submit" id="submit" value="Submit"></div>
                </form>
        </div>
-       <table class='users_overview'>
+       <table class="table table-responsive caption-top table-striped">
+       <thead class="table-primary">
        <form action="tkl.php" method="post">
        <th><input type="checkbox" label='selectall' onClick="toggle_tkl(this)" />Select all</th>
        <th>Mask</th>
@@ -159,6 +160,7 @@ $tkl = $rpc->serverban()->getAll();
        <th>Expires</th>
        <th>Duration</th>
        <th>Reason</th>
+       <thead
        
        <?php
                foreach($tkl as $tkl)
index 45904c0cf59254b4e77a28dd5b1bf7b05353bf09..e33b6fca2ed5b4d562215584a611bb4113609ecc 100644 (file)
--- a/users.php
+++ b/users.php
@@ -1,6 +1,5 @@
 <?php
 require_once "common.php";
-
 require_once "header.php";
 
 if (!empty($_POST)) {
@@ -47,36 +46,11 @@ if (!empty($_POST)) {
 /* Get the user list */
 $users = $rpc->user()->getAll();
 ?>
+<h4>Users Overview</h4>
+
 
 <div id="Users">
-       <table class='users_filter'>
-       <th class="thuf">Filter by: </th>
-       <th>
-               <form action="users.php" method="post">
-                       Nick: <input name="uf_nick" id="uf_nick" type="text">
-                       <input class="cute_button2" type="submit" value="Search">
-               </form>
-       </th>
-       <th>
-               <form action="" method="post">
-                       Hostname: <input name="uf_host" id="uf_host" type="text">
-                       <input class="cute_button2" type="submit" value="Search">
-               </form>
-       </th>
-       <th>
-               <form action="" method="post">
-                       IP: <input name="uf_ip" id="uf_ip" type="text">
-                       <input class="cute_button2" type="submit" value="Search">
-               </form>
-       </th>
-       <th class="thuffer">
-               <form action="" method="post">
-                       Account: <input name="uf_account" id="uf_account" type="text">
-                       <input class="cute_button2" type="submit" value="Search">
-               </form>
-       </th>
-       </form>
-       </table>
+       
        <?php
        if (isset($_POST['uf_nick']) && strlen($_POST['uf_nick']))
                Message::Info("Listing users which match nick: \"" . $_POST['uf_nick'] . "\"");
@@ -91,24 +65,32 @@ $users = $rpc->user()->getAll();
                Message::Info("Listing users which match account: \"" . $_POST['uf_account'] . "\"");
 
        ?>
-
-       <table class="table">
-       <thead>
-               <th><input type="checkbox" label='selectall' onClick="toggle_user(this)" />Select all</th>
-               <th>Nick</th>
-               <th>UID</th>
-               <th>Host / IP</th>
-               <th>Account</th>
-               <th>Usermodes <a href="https://www.unrealircd.org/docs/User_modes" target="_blank">ℹ️</a></th>
-               <th>Oper</th>
-               <th>Secure</th>
-               <th>Connected to</th>
-               <th>Reputation <a href="https://www.unrealircd.org/docs/Reputation_score" target="_blank">ℹ️</a></th>
+       <table class="table table-responsive caption-top table-striped">
+       <thead class="table-light">
+               <th scope="col"><h5>Filter:</h5></th>
+               <form action="" method="post">
+               <th scope="col" colspan="2">Nick <input name="uf_nick" type="text" class="form-control short-form-control">
+               <th scope="col" colspan="2">Host <input name="uf_host" type="text" class="form-control short-form-control"></th>
+               <th scope="col" colspan="2">IP <input name="uf_ip" type="text" class="form-control short-form-control"></th>
+               <th scope="col" colspan="2">Account <input name="uf_account" type="text" class="form-control short-form-control"></th>
+               <th scope="col"> <input class="btn btn-primary" type="submit" value="Search"></th></form>
+       </thead><thead class="table-primary">
+               <th scope="col"><input type="checkbox" label='selectall' onClick="toggle_user(this)" />Select all</th>
+               <th scope="col">Nick</th>
+               <th scope="col">UID</th>
+               <th scope="col">Host / IP</th>
+               <th scope="col">Account</th>
+               <th scope="col">Usermodes <a href="https://www.unrealircd.org/docs/User_modes" target="_blank">ℹ️</a></th>
+               <th scope="col">Oper</th>
+               <th scope="col">Secure</th>
+               <th scope="col">Connected to</th>
+               <th scope="col">Reputation <a href="https://www.unrealircd.org/docs/Reputation_score" target="_blank">ℹ️</a></th>
        </thead>
        
        <tbody>
        <form action="users.php" method="post">
        <?php
+
                foreach($users as $user)
                {
 
@@ -137,7 +119,7 @@ $users = $rpc->user()->getAll();
                                continue;
 
                        echo "<tr>";
-                       echo "<td><input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\"></td>";
+                       echo "<th scope=\"row\"><input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\"></th>";
                        $isBot = (strpos($user->user->modes, "B") !== false) ? ' <span class="badge-pill badge-dark">Bot</span>' : "";
                        echo "<td>".$user->name.$isBot.'</td>';
                        echo "<td>".$user->id."</td>";
@@ -159,18 +141,19 @@ $users = $rpc->user()->getAll();
                        echo "<td>".$user->user->reputation."</td>";
                }
        ?>
-       </tbody>
-       </table>
-       <label for="bantype">Apply action: </label><br>
+       </tbody></table>
+       <table class="table table-responsive table-light">
+       <tr>
+       <td colspan="2">
+       <label for="bantype">Apply action: </label>
        <select name="bantype" id="bantype">
                        <option value=""></option>
                <optgroup label="Bans">
                        <option value="gline">GLine</option>
                        <option value="gzline">GZLine</option>
                </optgroup>
-       </select>
-       <br>
-       <label for="banlen_w">Duration: </label><br>
+       </select></td><td colspan="2">
+       <label for="banlen_w">Duration: </label>
        <select name="banlen_w" id="banlen_w">
                        <?php
                        for ($i = 0; $i <= 56; $i++)
@@ -211,14 +194,46 @@ $users = $rpc->user()->getAll();
                                        echo "<option value=\"$i" . "h\">$i $h" . "</option>";
                                }
                        }
+                       
                        ?>
-       </select>
-       <br><label for="ban_reason">Reason:<br></label>
-       <textarea name="ban_reason" id="ban_reason">No reason</textarea><br>
-       <input class="cute_button" type="submit" value="Apply">
+       </select><br></td><tr><td colspan="3">
+       
+       <label for="ban_reason">Reason: </label>
+       <input class="form-control short-form-control" type="text" name="ban_reason" id="ban_reason" value="No reason">
+       <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
+                       Apply
+       </button></td></table>
+       <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="confirmModalCenterTitle" aria-hidden="true">
+       <div class="modal-dialog modal-dialog-centered" role="document">
+               <div class="modal-content">
+               <div class="modal-header">
+                       <h5 class="modal-title" id="myModalLabel">Apply ban</h5>
+                       <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                       <span aria-hidden="true">&times;</span>
+                       </button>
+               </div>
+               <div class="modal-body">
+                       Are you sure you want to do this?
+                       
+               </div>
+               <div class="modal-footer">
+                       <button id="CloseButton" type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
+                       <button type="submit" action="post" class="btn btn-danger">Ban Hammer</button>
+                       
+               </div>
+               </div>
+       </div>
+       </div>
+       
        </form>
        
-       </div
-</div>
+               </div>
+
+<script>
+    
+    $("#myModal").on('shown.bs.modal', function(){
+        $("#CloseButton").focus();
+    });
+</script>
 
 <?php require_once 'footer.php'; ?>