feat(web): drop per-binding list from customer credentials tab (item 15)
The tab now shows only the subscription token and the shared credential set. The Reality public key moved to the node edit form (item 17) and the socks username to the node itself (item 21), so nothing the bindings list showed is lost. Display-only change: the credentials endpoint payload is unchanged.
This commit is contained in:
+6
-7
@@ -627,11 +627,11 @@ function renderCredentialsPane(customer) {
|
||||
const data = customerFormState.credentials;
|
||||
if (!data) { pane.innerHTML = '<div class="empty"><b>加载中…</b></div>'; return; }
|
||||
const creds = data.credentials || {};
|
||||
const bindings = (data.bindings || []).map((entry) => `<div class="cred-group">
|
||||
<div class="g-head">${esc(entry.nodeName)}<span class="badge ${entry.status === 'active' ? 'green' : 'gray'}">${esc(statusText[entry.status] || entry.status)}</span><span class="mut" style="font-weight:400;font-size:12px">${esc(entry.protocol)}</span></div>
|
||||
${entry.username ? credRowHTML('用户名', entry.username) : ''}
|
||||
${entry.realityPublicKey ? credRowHTML('Reality 公钥', entry.realityPublicKey) : ''}
|
||||
</div>`).join('');
|
||||
// Round-3 item 15: the per-binding list (node name / status / protocol
|
||||
// / Reality public key) is gone — the tab shows only the subscription
|
||||
// token and the one shared credential set. Reality keys live on the
|
||||
// node edit form now (item 17); the socks username lives on the node
|
||||
// (item 21). Backend payload unchanged.
|
||||
pane.innerHTML = `<div class="cred-group"><div class="g-head">订阅</div>
|
||||
<div class="cred-row"><span class="k">订阅令牌</span><span class="v">${esc(data.subscriptionToken || '—')}</span>
|
||||
<button type="button" class="icon-btn" data-tip="复制" data-action="copy-text" data-value="${esc(data.subscriptionToken || '')}">${ICONS.copy}</button>
|
||||
@@ -640,8 +640,7 @@ function renderCredentialsPane(customer) {
|
||||
${credRowHTML('UUID', creds.clientId)}
|
||||
${credRowHTML('密码', creds.password)}
|
||||
${credRowHTML('Reality Short ID', creds.shortId)}
|
||||
</div>
|
||||
${bindings || '<div class="empty"><b>尚未关联节点</b></div>'}`;
|
||||
</div>`;
|
||||
}
|
||||
|
||||
function linkStatusLine(customer, source) {
|
||||
|
||||
Reference in New Issue
Block a user