4fe0df6c6d
Co-authored-by: Cursor <cursoragent@cursor.com>
159 lines
5.3 KiB
HTML
159 lines
5.3 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;
|
||
}
|
||
.pay-box {
|
||
margin-bottom: 16px;
|
||
padding: 12px;
|
||
border-radius: 10px;
|
||
border: 1px solid #2a3a2a;
|
||
background: #0e1610;
|
||
}
|
||
.pay-box .pay-title { font-size: 0.85rem; color: #9fe0b8; margin-bottom: 8px; }
|
||
.pay-row { display: flex; gap: 8px; align-items: stretch; }
|
||
.pay-row .id { flex: 1; }
|
||
.pay-row button {
|
||
width: auto;
|
||
margin: 0;
|
||
padding: 8px 12px;
|
||
flex-shrink: 0;
|
||
background: #2a4a36;
|
||
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>客户密钥</strong> 与激活码。授权站:{{ api_url }}</p>
|
||
|
||
{% if usdt_address %}
|
||
<div class="pay-box">
|
||
<div class="pay-title">USDT 收款地址({{ usdt_network or 'TRC20' }})</div>
|
||
<div class="pay-row">
|
||
<div class="id" id="usdtAddress">{{ usdt_address }}</div>
|
||
<button type="button" id="copyUsdtBtn">复制</button>
|
||
</div>
|
||
<div class="hint">仅支持 {{ usdt_network or 'TRC20' }} 网络,转错链无法找回。年卡 1000 USDT + 部署费 100 USDT。</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% 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>客户密钥</label>
|
||
<input type="text" name="client_api_key" placeholder="{% if status.has_client_key %}已保存 {{ status.client_key_masked }},可留空或填写新密钥{% else %}粘贴卖家提供的客户密钥(与激活码一起发放){% 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>
|
||
<script>
|
||
(function () {
|
||
var btn = document.getElementById("copyUsdtBtn");
|
||
var el = document.getElementById("usdtAddress");
|
||
if (!btn || !el) return;
|
||
btn.addEventListener("click", function () {
|
||
var text = (el.textContent || "").trim();
|
||
if (!text) return;
|
||
var done = function () {
|
||
var old = btn.textContent;
|
||
btn.textContent = "已复制";
|
||
setTimeout(function () { btn.textContent = old; }, 1500);
|
||
};
|
||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||
navigator.clipboard.writeText(text).then(done).catch(function () {
|
||
window.prompt("复制地址", text);
|
||
});
|
||
} else {
|
||
window.prompt("复制地址", text);
|
||
}
|
||
});
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html>
|