(filename)
| 1562 | } |
| 1563 | |
| 1564 | async function fetchUserEmail(filename) { |
| 1565 | try { |
| 1566 | showStatus('正在获取用户邮箱...', 'info'); |
| 1567 | const response = await fetch(`./creds/fetch-email/${encodeURIComponent(filename)}`, { |
| 1568 | method: 'POST', |
| 1569 | headers: getAuthHeaders() |
| 1570 | }); |
| 1571 | const data = await response.json(); |
| 1572 | if (response.ok && data.user_email) { |
| 1573 | showStatus(`成功获取邮箱: ${data.user_email}`, 'success'); |
| 1574 | // 直接更新卡片中的邮箱显示,不刷新整个列表 |
| 1575 | updateEmailDisplay(filename, data.user_email, 'normal'); |
| 1576 | } else { |
| 1577 | showStatus(data.message || '无法获取用户邮箱', 'error'); |
| 1578 | } |
| 1579 | } catch (error) { |
| 1580 | showStatus(`获取邮箱失败: ${error.message}`, 'error'); |
| 1581 | } |
| 1582 | } |
| 1583 | |
| 1584 | async function fetchAntigravityUserEmail(filename) { |
| 1585 | try { |
nothing calls this directly
no test coverage detected