(filename, email, managerType = 'normal')
| 1537 | // 邮箱相关 |
| 1538 | // 辅助函数:根据文件名更新卡片中的邮箱显示 |
| 1539 | function 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 | |
| 1564 | async function fetchUserEmail(filename) { |
| 1565 | try { |
no outgoing calls
no test coverage detected