diff --git a/gui/app.py b/gui/app.py index 6555a3a..eb52a26 100644 --- a/gui/app.py +++ b/gui/app.py @@ -563,11 +563,11 @@ def peer_enable(peer_id: int): name = item.get("name", "") pk = item.get("public_key", "") - addr = item.get("client_address", "") + addr = (item.get("client_address", "") or "").split("/")[0] # strip /32 if present routes = item.get("advertised_routes", "") or "" psk = item.get("peer_psk", "") or "" - if not (name and pk and addr and psk): - flash("Недостаточно данных для включения peer (нужны name/public key/address/psk)", "error") + if not (name and pk): + flash("Недостаточно данных для включения peer", "error") return redirect(url_for("index")) cmd = [ @@ -575,10 +575,12 @@ def peer_enable(peer_id: int): "add", "--client-name", name, "--client-public-key", pk, - "--client-address", addr, - "--client-preshared-key", psk, "--persistent-keepalive", "25", ] + if addr: + cmd += ["--client-address", addr] + if psk: + cmd += ["--client-preshared-key", psk] if routes: cmd += ["--client-routes", routes] diff --git a/gui/static/style.css b/gui/static/style.css index eab8639..f52f9c4 100644 --- a/gui/static/style.css +++ b/gui/static/style.css @@ -103,6 +103,15 @@ body { .logout-btn:hover { background: #fee2e2; color: #dc2626; } +.made-by { + font-family: 'Dancing Script', cursive; + font-size: 15px; + color: #b0b8cc; + text-align: center; + padding: 8px 0 4px; + letter-spacing: 0.02em; +} + /* ─── Layout ────────────────────────────────────────────────── */ .layout { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; } main { padding: 28px 32px; flex: 1; max-width: 1400px; width: 100%; } diff --git a/gui/templates/base.html b/gui/templates/base.html index 6c82966..6cd5f83 100644 --- a/gui/templates/base.html +++ b/gui/templates/base.html @@ -5,6 +5,7 @@ WG Admin +
diff --git a/gui/templates/login.html b/gui/templates/login.html index c6e1aa5..7ad4775 100644 --- a/gui/templates/login.html +++ b/gui/templates/login.html @@ -4,6 +4,7 @@ WG Admin — Вход + @@ -196,5 +206,6 @@
+

Made by Galyaviev