| 11 | import { api } from "@/lib/api"; |
| 12 | import { friendlyError, isThrottleErrorCode, throttleCooldownSeconds } from "@/lib/validators"; |
| 13 | |
| 14 | interface EmailCodeInputProps { |
| 15 | purpose: "bind" | "change_password" | "change_emby_password"; |
| 16 | // bind 用途需要目标邮箱;change_* 用途由后端用已绑定邮箱,可省略。 |
| 17 | email?: string; |
| 18 | code: string; |
| 19 | onCodeChange: (code: string) => void; |
| 20 | // 发码成功后把 verification_id 回传给父组件,提交时一并带上。 |
| 21 | onSent: (verificationId: string) => void; |
| 22 | disabled?: boolean; |
| 23 | } |
| 24 | |
| 25 | // EmailCodeInput 封装「获取验证码 + 输入验证码」的复用 UI(含重发冷却)。 |
nothing calls this directly
no outgoing calls
no test coverage detected