MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / updateEmailDisplay

Function updateEmailDisplay

front/common.js:1539–1562  ·  view source on GitHub ↗
(filename, email, managerType = 'normal')

Source from the content-addressed store, hash-verified

1537// 邮箱相关
1538// 辅助函数:根据文件名更新卡片中的邮箱显示
1539function updateEmailDisplay(filename, email, managerType = 'normal') {
1540 // 查找对应的凭证卡片
1541 const containerId = managerType === 'antigravity' ? 'antigravityCredsList' : 'credsList';
1542 const container = document.getElementById(containerId);
1543 if (!container) return false;
1544
1545 // 通过 data-filename 找到对应的复选框,再找到其父卡片
1546 const checkbox = container.querySelector(`input[data-filename="${filename}"]`);
1547 if (!checkbox) return false;
1548
1549 // 找到对应的 cred-card 元素
1550 const card = checkbox.closest('.cred-card');
1551 if (!card) return false;
1552
1553 // 找到邮箱显示元素
1554 const emailDiv = card.querySelector('.cred-email');
1555 if (emailDiv) {
1556 emailDiv.textContent = email;
1557 emailDiv.style.color = '#666';
1558 emailDiv.style.fontStyle = 'normal';
1559 return true;
1560 }
1561 return false;
1562}
1563
1564async function fetchUserEmail(filename) {
1565 try {

Callers 2

fetchUserEmailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected