Merge remote-tracking branch 'origin/master'

This commit is contained in:
ryoii 2020-04-24 21:34:30 +08:00
commit 69827701e3
3 changed files with 9 additions and 7 deletions

View File

@ -37,26 +37,26 @@ class DefaultLoginSolver(
val input: suspend () -> String,
val overrideLogger: MiraiLogger? = null
) : LoginSolver() {
private val degelate: LoginSolver
private val delegate: LoginSolver
init {
if (Desktop.isDesktopSupported()) {
degelate = SwingSolver
delegate = SwingSolver
} else {
degelate = DefaultLoginSolverImpl(input, overrideLogger)
delegate = DefaultLoginSolverImpl(input, overrideLogger)
}
}
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? {
return degelate.onSolveSliderCaptcha(bot, url)
return delegate.onSolveSliderCaptcha(bot, url)
}
override suspend fun onSolveUnsafeDeviceLoginVerify(bot: Bot, url: String): String? {
return degelate.onSolveUnsafeDeviceLoginVerify(bot, url)
return delegate.onSolveUnsafeDeviceLoginVerify(bot, url)
}
}

View File

@ -44,7 +44,9 @@ object SwingSolver : LoginSolver() {
需要进行账户安全认证<br>
该账户有[设备锁]/[不常用登录地点]/[不常用设备登录]的问题<br>
完成以下账号认证即可成功登录|理论本认证在mirai每个账户中最多出现1次<br>
完成后请关闭该窗口
请将该链接在QQ浏览器中打开并完成认证<br>
成功后请关闭该窗口<br>
这步操作将在后续的版本中优化
""".trimIndent()
).last()
JTextField(url).append()