(filename)
| 1481 | } |
| 1482 | function batchAntigravityAction(action) { AppState.antigravityCreds.batchAction(action); } |
| 1483 | function downloadAntigravityCred(filename) { |
| 1484 | fetch(`./creds/download/${filename}?mode=antigravity`, { headers: getAuthHeaders() }) |
| 1485 | .then(r => r.ok ? r.blob() : Promise.reject()) |
| 1486 | .then(blob => { |
| 1487 | const url = window.URL.createObjectURL(blob); |
| 1488 | const a = document.createElement('a'); |
| 1489 | a.href = url; |
| 1490 | a.download = filename; |
| 1491 | a.click(); |
| 1492 | window.URL.revokeObjectURL(url); |
| 1493 | showStatus(`✅ 已下载: ${filename}`, 'success'); |
| 1494 | }) |
| 1495 | .catch(() => showStatus(`下载失败: ${filename}`, 'error')); |
| 1496 | } |
| 1497 | function deleteAntigravityCred(filename) { |
| 1498 | if (confirm(`确定要删除 ${filename} 吗?`)) { |
| 1499 | AppState.antigravityCreds.action(filename, 'delete'); |
nothing calls this directly
no test coverage detected