mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
69827701e3
@ -37,26 +37,26 @@ class DefaultLoginSolver(
|
|||||||
val input: suspend () -> String,
|
val input: suspend () -> String,
|
||||||
val overrideLogger: MiraiLogger? = null
|
val overrideLogger: MiraiLogger? = null
|
||||||
) : LoginSolver() {
|
) : LoginSolver() {
|
||||||
private val degelate: LoginSolver
|
private val delegate: LoginSolver
|
||||||
|
|
||||||
init {
|
init {
|
||||||
if (Desktop.isDesktopSupported()) {
|
if (Desktop.isDesktopSupported()) {
|
||||||
degelate = SwingSolver
|
delegate = SwingSolver
|
||||||
} else {
|
} else {
|
||||||
degelate = DefaultLoginSolverImpl(input, overrideLogger)
|
delegate = DefaultLoginSolverImpl(input, overrideLogger)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onSolvePicCaptcha(bot: Bot, data: ByteArray): String? {
|
override suspend fun onSolvePicCaptcha(bot: Bot, data: ByteArray): String? {
|
||||||
return degelate.onSolvePicCaptcha(bot, data)
|
return delegate.onSolvePicCaptcha(bot, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onSolveSliderCaptcha(bot: Bot, url: String): String? {
|
override suspend fun onSolveSliderCaptcha(bot: Bot, url: String): String? {
|
||||||
return degelate.onSolveSliderCaptcha(bot, url)
|
return delegate.onSolveSliderCaptcha(bot, url)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onSolveUnsafeDeviceLoginVerify(bot: Bot, url: String): String? {
|
override suspend fun onSolveUnsafeDeviceLoginVerify(bot: Bot, url: String): String? {
|
||||||
return degelate.onSolveUnsafeDeviceLoginVerify(bot, url)
|
return delegate.onSolveUnsafeDeviceLoginVerify(bot, url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@ object SwingSolver : LoginSolver() {
|
|||||||
需要进行账户安全认证<br>
|
需要进行账户安全认证<br>
|
||||||
该账户有[设备锁]/[不常用登录地点]/[不常用设备登录]的问题<br>
|
该账户有[设备锁]/[不常用登录地点]/[不常用设备登录]的问题<br>
|
||||||
完成以下账号认证即可成功登录|理论本认证在mirai每个账户中最多出现1次<br>
|
完成以下账号认证即可成功登录|理论本认证在mirai每个账户中最多出现1次<br>
|
||||||
完成后请关闭该窗口
|
请将该链接在QQ浏览器中打开并完成认证<br>
|
||||||
|
成功后请关闭该窗口<br>
|
||||||
|
这步操作将在后续的版本中优化
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
).last()
|
).last()
|
||||||
JTextField(url).append()
|
JTextField(url).append()
|
||||||
|
Loading…
Reference in New Issue
Block a user