(id, currentToken = '')
| 1653 | } |
| 1654 | |
| 1655 | async function editSessionToken(id, currentToken = '') { |
| 1656 | const current = String(currentToken || ''); |
| 1657 | const nextToken = window.prompt('请输入新的 Session Token(留空将清空)', current); |
| 1658 | if (nextToken === null) return; |
| 1659 | try { |
| 1660 | await api.patch(`/accounts/${id}`, { session_token: String(nextToken).trim() }); |
| 1661 | toast.success('Session Token 已更新'); |
| 1662 | } catch (error) { |
| 1663 | toast.error('更新 Session Token 失败: ' + error.message); |
| 1664 | } finally { |
| 1665 | await viewAccount(id); |
| 1666 | loadAccounts(); |
| 1667 | } |
| 1668 | } |
| 1669 | |
| 1670 | // 复制邮箱 |
| 1671 | function copyEmail(email) { |
nothing calls this directly
no test coverage detected