diff --git a/src/templates/dashboard_template.py b/src/templates/dashboard_template.py index b8db40c..6971f31 100644 --- a/src/templates/dashboard_template.py +++ b/src/templates/dashboard_template.py @@ -11,8 +11,6 @@ from zoneinfo import ZoneInfo # imports for the __init_subclass__ method, do not remove pls from firewall import fwtype -from firewall.iptables import Iptables -from firewall.raw import Raw def _escape(value) -> str: @@ -142,6 +140,68 @@ def generate_dashboard(stats: dict, dashboard_path: str = "") -> str: .download-btn:active {{ background: #1f7a2f; }} + .banlist-dropdown {{ + position: relative; + display: inline-block; + width: 100%; + }} + .banlist-dropdown-btn {{ + display: block; + width: 100%; + padding: 8px 14px; + background: #238636; + color: #ffffff; + text-decoration: none; + border-radius: 6px; + font-weight: 500; + font-size: 13px; + transition: background 0.2s; + border: 1px solid #2ea043; + cursor: pointer; + text-align: left; + box-sizing: border-box; + }} + .banlist-dropdown-btn:hover {{ + background: #2ea043; + }} + .banlist-dropdown-menu {{ + display: none; + position: absolute; + right: 0; + left: 0; + background-color: #161b22; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3); + z-index: 1; + border: 1px solid #30363d; + border-radius: 6px; + margin-top: 4px; + overflow: hidden; + }} + .banlist-dropdown-menu.show {{ + display: block; + }} + .banlist-dropdown-menu a {{ + color: #c9d1d9; + padding: 6px 12px; + text-decoration: none; + display: flex; + align-items: center; + gap: 6px; + transition: background 0.2s; + font-size: 12px; + }} + .banlist-dropdown-menu a:hover {{ + background-color: #1c2128; + color: #58a6ff; + }} + .banlist-dropdown-menu a.disabled {{ + color: #6e7681; + cursor: not-allowed; + pointer-events: none; + }} + .banlist-icon {{ + font-size: 14px; + }} .stats-grid {{ display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); @@ -658,13 +718,19 @@ def generate_dashboard(stats: dict, dashboard_path: str = "") -> str: BlessedRebuS/Krawl -
- - -
+
+
+ + +
+

Krawl Dashboard

@@ -952,6 +1018,43 @@ def generate_dashboard(stats: dict, dashboard_path: str = "") -> str: