Show TRC20 USDT pay address on the license page.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -43,6 +43,24 @@
|
||||
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;
|
||||
@@ -75,6 +93,17 @@
|
||||
<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 %}
|
||||
|
||||
@@ -102,5 +131,28 @@
|
||||
套餐:{{ 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>
|
||||
|
||||
Reference in New Issue
Block a user