Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
update to v3.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Mar 23, 2022
1 parent c33424a commit 26e91c5
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 28 deletions.
23 changes: 23 additions & 0 deletions .changelog/v3.0.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
real version: `v0.0.10`

simbot-mirai version: `v3.0.0.preview.5.0-21000.1.0`

## 更新内容
- 优化登录成功后的额外说明
- 优化扫码登录的提示
- 更新内置simbot版本

## 其他说明
#### 版本号
目前版本 `v3.0.10` 等同于 `v0.0.10`, 请在脑海中自动将版本最前的数字-3。
由于 `macOS`(`dmg` & `pkg`) 打包必须保证版本号符合规则: `MAJOR[.MINOR][.PATCH]` 且:
- `MAJOR` 是大于0的数字;
- `MINOR` 是一个可选的非负整数;
- `PATCH` 是一个可选的非负整数;
因此对于`dmg``pkg`文件来说,不能使用最大版本号小于0的版本。因此选择将 `MAJOR` 数字与当前环境下 `simbot` 对应的 `MAJOR` 一致,也就是 `3`

有关于其他文件的版本说明请参考 [compose-jb/tutorials/Building native distribution/Specifying package version](https://github.com/JetBrains/compose-jb/tree/master/tutorials/Native_distributions_and_local_execution#specifying-package-version)

<hr>


10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = "love.forte.simbot"
val subVersion = "0.9"
val subVersion = "0.10"
version = "3.$subVersion"

repositories {
Expand All @@ -27,7 +27,7 @@ configurations.all {
}
}

val simbotMirai = "3.0.0.preview.3.0-292.0.1-SNAPSHOT"
val simbotMirai = "3.0.0.preview.5.0-21000.1.0"


dependencies {
Expand Down Expand Up @@ -111,17 +111,17 @@ compose.desktop {


macOS {
this.iconFile.set(project.file("icon.icns"))
iconFile.set(project.file("icon.icns"))
}

windows {
this.iconFile.set(project.file("icon.ico"))
iconFile.set(project.file("icon.ico"))
shortcut = true
menuGroup = "simbot"
}

linux {
this.iconFile.set(project.file("icon.png"))
iconFile.set(project.file("icon.png"))
shortcut = true
debMaintainer = "[email protected]"
menuGroup = "simbot"
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/love/forte/simbot/mlh/window/CerTip.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fun ColumnScope.tip() {
"https://www.selenium.dev/zh-cn/documentation/test_practices/discouraged/captchas/"
)

append(" 中的提倡与描述,此工具将不会提供对滑动验证码的自动化验证.")
append(" 中的提倡与描述,此工具将不会提供对滑动验证码的自动化验证")
}
}
}
Expand Down
58 changes: 36 additions & 22 deletions src/main/kotlin/love/forte/simbot/mlh/window/RunLoginBot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -308,40 +308,53 @@ private fun WindowScope.onSolvePicCaptcha(state: PrepareBrowserDriverState) {
con.cancel()
state.onSolvePicCaptcha = null
}
val verColl = rememberScrollState(0)
Window(
onCloseRequest = { doClose() },
title = "图片验证码处理",
icon = Logo.painter,
) {
Column {
Image(bitmap = loadImageBitmap(data.inputStream()), contentDescription = "图片验证码")
TextField(
value = textValue,
onValueChange = { textValue = it.trim() },
placeholder = { Text("输入图片验证码结果") },
singleLine = true,
)
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp)
Box {
Box(
Modifier.verticalScroll(state = verColl, flingBehavior = flingBehavior())
) {
Button(
onClick = {
con.resume(null)
state.onSolvePicCaptcha = null
}
) {
Text("刷新")
}
Column {
Image(bitmap = loadImageBitmap(data.inputStream()), contentDescription = "图片验证码")
TextField(
value = textValue,
onValueChange = { textValue = it.trim() },
placeholder = { Text("输入图片验证码结果") },
singleLine = true,
)
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp)
) {
Button(
onClick = {
con.resume(null)
state.onSolvePicCaptcha = null
}
) {
Text("刷新")
}

OutlinedButton(
onClick = { doClose() }
) {
Text("关闭")
OutlinedButton(
onClick = { doClose() }
) {
Text("关闭")
}

}
}

VerticalScrollbar(
modifier = Modifier.align(Alignment.CenterEnd), adapter = rememberScrollbarAdapter(verColl)
)
}

}


}

}
Expand Down Expand Up @@ -476,6 +489,7 @@ private fun ColumnScope.showBot(bot: Bot) {
Text("bot group size: ${bot.groups.size}")
Text("您的bot已经成功登录。如果不出意外的话,再次从其他地方登录bot(例如您的项目)将不会再出现验证。")
Text("现在您可以退出此软件,并回归到项目中了。")
Text("当然,这并不是绝对的。如果你仍旧无法正常使用simbot项目,这也是常有的事情。请反馈至issue。")
}


Expand Down

0 comments on commit 26e91c5

Please sign in to comment.