8eefc6cfd5
Users can paste the key from the seller instead of editing license.env; it persists in license_state.json. Co-authored-by: Cursor <cursoragent@cursor.com>
107 lines
3.6 KiB
HTML
107 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>软件授权</title>
|
||
<style>
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
body {
|
||
min-height: 100vh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 24px;
|
||
background: #0a0a10;
|
||
color: #e8e8f0;
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
}
|
||
.box {
|
||
width: 100%;
|
||
max-width: 440px;
|
||
background: #12121a;
|
||
border: 1px solid #2a2a3a;
|
||
border-radius: 14px;
|
||
padding: 28px 24px;
|
||
}
|
||
h1 {
|
||
font-size: 1.35rem;
|
||
margin-bottom: 8px;
|
||
background: linear-gradient(90deg, #4cc2ff, #7b42ff);
|
||
-webkit-background-clip: text;
|
||
-webkit-text-fill-color: transparent;
|
||
}
|
||
.muted { color: #9aa0b4; font-size: 0.9rem; margin-bottom: 18px; line-height: 1.5; }
|
||
.row { margin-bottom: 14px; }
|
||
label { display: block; font-size: 0.85rem; color: #b8bfd4; margin-bottom: 6px; }
|
||
.id {
|
||
word-break: break-all;
|
||
background: #0c0c14;
|
||
border: 1px solid #2a2a3a;
|
||
border-radius: 8px;
|
||
padding: 10px 12px;
|
||
font-family: ui-monospace, Consolas, monospace;
|
||
font-size: 0.85rem;
|
||
}
|
||
input[type=text], input[type=password] {
|
||
width: 100%;
|
||
padding: 10px 12px;
|
||
border-radius: 8px;
|
||
border: 1px solid #2a2a3a;
|
||
background: #0c0c14;
|
||
color: #fff;
|
||
font-size: 1rem;
|
||
}
|
||
button {
|
||
width: 100%;
|
||
margin-top: 8px;
|
||
padding: 11px 14px;
|
||
border: 0;
|
||
border-radius: 8px;
|
||
background: linear-gradient(90deg, #3a8dff, #6b4dff);
|
||
color: #fff;
|
||
font-size: 1rem;
|
||
cursor: pointer;
|
||
}
|
||
.ok { color: #5ddea8; margin: 10px 0; font-size: 0.9rem; }
|
||
.err { color: #ff7b8a; margin: 10px 0; font-size: 0.9rem; }
|
||
.meta { margin-top: 16px; font-size: 0.85rem; color: #9aa0b4; line-height: 1.6; }
|
||
a { color: #7ec8ff; }
|
||
.hint { color: #6a7088; font-size: 0.78rem; margin-top: 4px; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="box">
|
||
<h1>软件授权</h1>
|
||
<p class="muted">复制设备 ID,联系微信 <strong>{{ wechat }}</strong> 获取 <strong>CLIENT_API_KEY</strong> 与激活码。授权站:{{ api_url }}</p>
|
||
|
||
{% if message %}<p class="ok">{{ message }}</p>{% endif %}
|
||
{% if error %}<p class="err">{{ error }}</p>{% endif %}
|
||
|
||
<div class="row">
|
||
<label>设备 ID</label>
|
||
<div class="id" id="deviceId">{{ device_id }}</div>
|
||
</div>
|
||
|
||
<form method="post" action="/license">
|
||
<div class="row">
|
||
<label>CLIENT_API_KEY</label>
|
||
<input type="text" name="client_api_key" placeholder="{% if status.has_client_key %}已保存 {{ status.client_key_masked }},可留空或填写新密钥{% else %}粘贴卖家提供的 CLIENT_API_KEY{% endif %}" autocomplete="off" {% if not status.has_client_key %}required{% endif %}>
|
||
<div class="hint">与授权站后台「系统设置」中的密钥一致,本地保存后下次可留空。</div>
|
||
</div>
|
||
<div class="row">
|
||
<label>激活码</label>
|
||
<input type="text" name="code" placeholder="粘贴激活码" autocomplete="off" required>
|
||
</div>
|
||
<button type="submit">兑换激活</button>
|
||
</form>
|
||
|
||
<div class="meta">
|
||
状态:{% if status.valid %}已授权{% else %}未授权{% endif %}
|
||
({{ status.message or status.reason or '—' }})<br>
|
||
套餐:{{ status.plan or '—' }} 到期:{{ status.expires_at or '—' }}
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|