diff --git a/README.md b/README.md index 05c4fa1..2018b05 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,9 @@ GitHub Actions workflows in `.github/workflows/`: ## 📋 Fix / changelog (this fork) +### v2.5.2 +* **Tunnels UI redesign** — Settings → Tunnels: grouped layout (public access / outbound VPN), provider cards, status pills, responsive grid. + ### v2.5.1 * **One-click panel update** — Settings → About → **Update panel**: downloads release ZIP from Gitea (or `git checkout` when `.git` exists), runs `pip install`, restarts. diff --git a/app.py b/app.py index 6fbc533..6f601b6 100644 --- a/app.py +++ b/app.py @@ -102,7 +102,7 @@ else: application_path = os.path.dirname(__file__) DATA_FILE = os.path.join(application_path, 'data.json') # legacy JSON; used only for one-shot import / export -CURRENT_VERSION = "v2.5.1" +CURRENT_VERSION = "v2.5.2" RELEASES_REPO_URL = repo_url() RELEASES_API_LATEST = api_latest_url() BIN_DIR = os.environ.get('TUNNEL_BIN_DIR', os.path.join(application_path, 'bin')) diff --git a/static/css/style.css b/static/css/style.css index a548807..b9bd746 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1623,6 +1623,319 @@ a:hover { gap: var(--space-md); } +/* ===== Tunnels (Settings) ===== */ +.tunnels-card .tunnels-header { + margin-bottom: var(--space-lg); +} + +.tunnels-card .tunnels-header .card-title { + margin: 0; + display: flex; + align-items: center; + gap: var(--space-sm); +} + +.tunnels-card .tunnels-subtitle { + margin: var(--space-xs) 0 0; + font-size: 0.875rem; + color: var(--text-secondary); + line-height: 1.45; +} + +.tunnels-local { + display: flex; + align-items: center; + gap: var(--space-md); + padding: var(--space-md) var(--space-lg); + margin-bottom: var(--space-lg); + border-radius: var(--radius-md); + border: 1px solid var(--border-focus); + background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.06)); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); +} + +.tunnels-local-icon { + flex-shrink: 0; + width: 44px; + height: 44px; + display: flex; + align-items: center; + justify-content: center; + border-radius: var(--radius-md); + background: var(--accent-gradient); + font-size: 1.25rem; + box-shadow: var(--shadow-glow); +} + +.tunnels-local-body { + flex: 1; + min-width: 0; +} + +.tunnels-local-label { + font-size: 0.75rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.04em; + color: var(--text-muted); + margin-bottom: var(--space-xs); +} + +.tunnels-local-url { + display: flex; + align-items: center; + gap: var(--space-sm); +} + +.tunnels-local-url code { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.9rem; + color: var(--text-primary); + background: transparent; + padding: 0; +} + +.tunnels-section { + margin-bottom: var(--space-lg); +} + +.tunnels-section:last-of-type { + margin-bottom: var(--space-md); +} + +.tunnels-section-title { + font-size: 0.7rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.08em; + color: var(--text-muted); + margin: 0 0 var(--space-sm) var(--space-xs); +} + +.tunnels-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: var(--space-md); +} + +.tunnel-card { + display: flex; + flex-direction: column; + gap: var(--space-md); + padding: var(--space-md); + border-radius: var(--radius-md); + border: 1px solid var(--border-color); + background: var(--bg-primary); + transition: border-color var(--transition-base), box-shadow var(--transition-base); +} + +.tunnel-card:hover { + border-color: var(--border-hover); +} + +.tunnel-card--running { + border-color: var(--success-border); + box-shadow: 0 0 0 1px var(--success-border), inset 0 1px 0 rgba(34, 197, 94, 0.06); +} + +.tunnel-card--connected { + border-color: var(--success-border); + box-shadow: 0 0 0 1px var(--success-border); +} + +.tunnel-card-head { + display: flex; + align-items: flex-start; + gap: var(--space-md); +} + +.tunnel-card-icon { + flex-shrink: 0; + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + border-radius: var(--radius-sm); + font-size: 1.1rem; + font-weight: 700; + color: #fff; +} + +.tunnel-card-icon--cloudflare { background: linear-gradient(135deg, #f38020, #faae40); } +.tunnel-card-icon--ngrok { background: linear-gradient(135deg, #1f2d3d, #3d5a80); } +.tunnel-card-icon--warp { background: linear-gradient(135deg, #f38020, #e85d04); } +.tunnel-card-icon--nordvpn { background: linear-gradient(135deg, #4687ff, #2b4eff); } +.tunnel-card-icon--local { background: var(--accent-gradient); } + +.tunnel-card-meta { + flex: 1; + min-width: 0; +} + +.tunnel-card-title { + font-size: 0.95rem; + font-weight: 600; + margin: 0; + line-height: 1.3; +} + +.tunnel-card-desc { + font-size: 0.78rem; + color: var(--text-muted); + margin: var(--space-xs) 0 0; + line-height: 1.4; +} + +.tunnel-status-pill { + flex-shrink: 0; + font-size: 0.7rem; + font-weight: 600; + padding: 4px 10px; + border-radius: var(--radius-full); + white-space: nowrap; + background: rgba(255, 255, 255, 0.06); + color: var(--text-secondary); + border: 1px solid var(--border-color); +} + +.tunnel-status-pill--ok { + background: var(--success-bg); + color: var(--success); + border-color: var(--success-border); +} + +.tunnel-status-pill--info { + background: var(--info-bg); + color: var(--info); + border-color: rgba(59, 130, 246, 0.25); +} + +.tunnel-card-body { + display: flex; + flex-direction: column; + gap: var(--space-sm); +} + +.tunnel-url-box { + padding: var(--space-sm) var(--space-md); + border-radius: var(--radius-sm); + background: var(--bg-secondary); + border: 1px dashed var(--border-color); + font-size: 0.8rem; + color: var(--text-secondary); + line-height: 1.45; + min-height: 2.5rem; +} + +.tunnel-url-box--empty { + font-style: italic; + color: var(--text-muted); +} + +.tunnel-url-row { + display: flex; + align-items: center; + gap: var(--space-sm); + margin-top: var(--space-xs); +} + +.tunnel-url-row:first-child { + margin-top: 0; +} + +.tunnel-url-row code { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.8rem; + color: var(--text-accent); + background: transparent; + padding: 0; +} + +.tunnel-status-line { + font-size: 0.82rem; + color: var(--text-secondary); + line-height: 1.45; +} + +.tunnel-status-line--server { + font-family: ui-monospace, monospace; + font-size: 0.78rem; + color: var(--text-accent); + padding: var(--space-xs) var(--space-sm); + background: var(--bg-secondary); + border-radius: var(--radius-sm); +} + +.tunnel-hint { + font-size: 0.75rem; + color: var(--text-muted); + line-height: 1.4; + margin: 0; +} + +.tunnel-card-actions { + display: flex; + flex-wrap: wrap; + gap: var(--space-sm); + margin-top: auto; +} + +.tunnel-card-actions .btn { + flex: 1; + min-width: 7rem; + justify-content: center; +} + +.tunnel-card-actions--triple .btn { + min-width: 5.5rem; +} + +.tunnel-nordvpn-fields { + display: grid; + grid-template-columns: 1fr 1fr; + gap: var(--space-sm); +} + +.tunnels-footnote { + margin: var(--space-md) 0 0; + padding: var(--space-md); + border-radius: var(--radius-sm); + background: var(--bg-secondary); + border-left: 3px solid var(--accent); + font-size: 0.8rem; + color: var(--text-secondary); + line-height: 1.5; +} + +@media (max-width: 640px) { + .tunnels-local { + flex-direction: column; + align-items: stretch; + text-align: center; + } + + .tunnels-local-url { + flex-direction: column; + } + + .tunnels-grid { + grid-template-columns: 1fr; + } + + .tunnel-nordvpn-fields { + grid-template-columns: 1fr; + } +} + .mt-md { margin-top: var(--space-md); } diff --git a/templates/settings.html b/templates/settings.html index ca15c54..15d5bfc 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -204,112 +204,147 @@ -
{{ request.url.scheme }}://{{ request.url.netloc }}
+ {{ _('tunnels_subtitle') }}
+{{ request.url.scheme }}://{{ request.url.netloc }}
{{ _('tunnels_hint') }}
+ +{{ _('warp_status_unknown') }}
+{{ _('warp_hint') }}
+{{ _('nordvpn_status_unknown') }}
+ +{{ _('nordvpn_hint') }}
+{{ _('tunnels_hint') }}
${escapeHTML(url)}
+ ${escapeHTML(url)}