diff --git a/vps/install-vps.sh b/vps/install-vps.sh index b285459..3d2bf6e 100755 --- a/vps/install-vps.sh +++ b/vps/install-vps.sh @@ -2,7 +2,7 @@ set -u APP_NAME="OpenWrt Remote Hub" -INSTALLER_VERSION="2026-07-01-host-prompt-v6" +INSTALLER_VERSION="2026-07-02-login-logo-v7" RAW_BASE="${RAW_URL:-https://raw.githubusercontent.com/kzolotarev95/luci-app-owrt-remote/main}" STATE_DIR="${OWRT_REMOTE_STATE_DIR:-/var/lib/owrt-remote}" HUB_LOGIN="${HUB_LOGIN:-admin}" @@ -97,10 +97,11 @@ install_xray_binary() { install_files() { cache_bust="$(date +%s)" - $SUDO mkdir -p /opt/owrt-remote "$STATE_DIR" /etc/xray + $SUDO mkdir -p /opt/owrt-remote/static "$STATE_DIR" /etc/xray $SUDO wget -O /opt/owrt-remote/owrt-remote-hub.py "$RAW_BASE/vps/owrt-remote-hub.py?v=$cache_bust" $SUDO wget -O /etc/systemd/system/owrt-remote.service "$RAW_BASE/vps/owrt-remote.service?v=$cache_bust" $SUDO wget -O /opt/owrt-remote/enable-https.sh "$RAW_BASE/vps/enable-https.sh?v=$cache_bust" + $SUDO wget -O /opt/owrt-remote/static/logo.png "$RAW_BASE/vps/static/logo.png?v=$cache_bust" $SUDO chmod +x /opt/owrt-remote/owrt-remote-hub.py /opt/owrt-remote/enable-https.sh } diff --git a/vps/owrt-remote-hub.py b/vps/owrt-remote-hub.py index aef5142..40cc801 100644 --- a/vps/owrt-remote-hub.py +++ b/vps/owrt-remote-hub.py @@ -27,8 +27,11 @@ from pathlib import Path APP_NAME = "OpenWrt Remote Hub" +APP_DIR = Path(__file__).resolve().parent STATE_DIR = Path(os.environ.get("OWRT_REMOTE_STATE_DIR", "/var/lib/owrt-remote")) DB_PATH = Path(os.environ.get("OWRT_REMOTE_DB", str(STATE_DIR / "hub.db"))) +STATIC_DIR = Path(os.environ.get("OWRT_REMOTE_STATIC_DIR", str(APP_DIR / "static"))) +LOGO_FILE = STATIC_DIR / "logo.png" AUTH_FILE = STATE_DIR / "hub-auth.json" SESSION_TOKEN_FILE = STATE_DIR / "hub-session.token" SESSIONS_FILE = STATE_DIR / "hub-sessions.json" @@ -2194,6 +2197,8 @@ body::before{{content:"";position:fixed;inset:-28%;pointer-events:none;backgroun .brand{{display:block;text-align:center;margin-bottom:14px}} h1{{margin:0;font-size:18px;line-height:1.1;letter-spacing:0}}.appBanner{{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:54px;padding:10px 12px;border:1px solid rgba(34,211,238,.34);border-radius:8px;background:linear-gradient(110deg,rgba(34,211,238,.14),rgba(124,58,237,.24),rgba(236,72,153,.14));box-shadow:0 10px 24px rgba(124,58,237,.18),inset 0 1px 0 rgba(255,255,255,.10);font-size:17px;overflow:hidden}}.appBanner::before{{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);transform:translateX(-120%);animation:bannerShine 6.2s ease-in-out infinite}}.appBanner span{{position:relative}}@keyframes bannerShine{{0%,45%{{transform:translateX(-120%)}}72%,100%{{transform:translateX(120%)}}}} p{{margin:3px 0 0;color:var(--muted)}} +.loginLogo{{display:flex;align-items:center;justify-content:center;margin:-2px 0 12px;padding:10px 12px;border:1px solid rgba(34,211,238,.28);border-radius:8px;background:linear-gradient(135deg,rgba(255,255,255,.10),rgba(34,211,238,.05),rgba(124,58,237,.10));box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 12px 28px rgba(0,0,0,.18);overflow:hidden}} +.loginLogo img{{display:block;width:100%;max-width:305px;height:auto;filter:drop-shadow(0 10px 18px rgba(0,0,0,.24))}} label{{display:block;margin:10px 0 5px;font-weight:850;color:#ede9fe;text-align:center}} input{{width:100%;border:1px solid var(--line);border-radius:8px;padding:11px 12px;background:rgba(8,5,18,.74);color:var(--text);outline:none;text-align:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}} input:focus{{border-color:rgba(34,211,238,.62);box-shadow:0 0 0 3px rgba(34,211,238,.12),inset 0 1px 0 rgba(255,255,255,.04)}} @@ -2206,6 +2211,7 @@ button:hover{{filter:brightness(1.06)}}