Files
opsx-vpn/backend/internal/service/openvpn/auth_result.go
T

22 lines
3.5 KiB
Go

package openvpn
// This page is intentionally outcome-neutral: the auth component can render its
// end template for different outcomes. Only the VPN client knows connection state.
// Never reflect callback parameters or user identity into this page.
const authResultPage = `<!doctype html>
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="light"><meta name="referrer" content="no-referrer"><title>返回 VPN 客户端 · OPSX VPN</title>
<style>
*{box-sizing:border-box}body{margin:0;min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:28px 20px;background:radial-gradient(ellipse 70% 50% at 50% 0%,#e5f1ff 0%,transparent 100%),#f5f8fc;color:#1c314a;font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}
main{width:min(100%,480px)}.brand{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:26px;color:#244363;font-size:15px;font-weight:750;letter-spacing:.035em}.brand-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#2878d0;color:#fff}
.card{padding:42px 38px 36px;background:#fff;border:1px solid #e5edf6;border-radius:22px;box-shadow:0 22px 55px rgba(34,77,126,.08),0 2px 8px rgba(34,77,126,.025);text-align:center}
.mark{display:grid;place-items:center;width:68px;height:68px;margin:0 auto 24px;background:#eef6ff;border:1px solid #dcecff;border-radius:20px;color:#2477d0}
h1{margin:0;color:#193550;font-size:25px;line-height:1.35;letter-spacing:-.025em}p{max-width:340px;margin:14px auto 0;color:#60758c;line-height:1.75}
.next{display:flex;align-items:flex-start;gap:13px;margin-top:32px;padding:17px 18px;border:1px solid #e8eff8;border-radius:14px;background:#f7faff;text-align:left}.next-icon{display:grid;flex:none;place-items:center;width:28px;height:28px;border-radius:9px;background:#e3f0ff;color:#2878d0}.next strong{display:block;color:#25415d;font-size:14px;line-height:1.5}.next span{display:block;margin-top:2px;color:#6b8095;font-size:13px;line-height:1.55}
footer{margin-top:22px;color:#8a9bad;font-size:12px;text-align:center}@media(max-width:480px){.card{padding:34px 23px 28px;border-radius:18px}h1{font-size:23px}.brand{margin-bottom:22px}}
</style></head><body><main><div class="brand"><span class="brand-icon" aria-hidden="true"><svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M12 2 20 5.5v6c0 5-3 8.4-8 10.5-5-2.1-8-5.5-8-10.5v-6L12 2Z" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/></svg></span>OPSX VPN</div>
<section class="card" aria-labelledby="title"><div class="mark" aria-hidden="true"><svg width="35" height="35" viewBox="0 0 36 36" fill="none"><rect x="6" y="8" width="24" height="19" rx="3" stroke="currentColor" stroke-width="2"/><path d="M12 13h12M12 18h7M14 31h8M18 27v4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></div>
<h1 id="title">请返回 VPN 客户端</h1><p>浏览器认证步骤已结束,请在 VPN 客户端查看连接状态。</p>
<div class="next"><span class="next-icon" aria-hidden="true"><svg width="17" height="17" viewBox="0 0 20 20" fill="none"><path d="M4 10h12m-5-5 5 5-5 5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span><div><strong>下一步:切回 VPN 客户端</strong><span>如客户端提示失败,请按提示重试或联系管理员。</span></div></div></section>
<footer>此浏览器页面可以关闭</footer></main></body></html>`