Skip to content

Commit c4ab9ec

Browse files
committed
-
1 parent 11ec7ca commit c4ab9ec

File tree

6 files changed

+73
-22
lines changed

6 files changed

+73
-22
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ jobs:
4747
4848
- name: Rename and Collect APKs
4949
run: |
50-
find app/build/outputs/apk/release/ -name "*.apk" -exec mv {} "wifitoolbox-release-${{ env.VERSION_TAG }}.apk" \;
51-
find app/build/outputs/apk/debug/ -name "*.apk" -exec mv {} "wifitoolbox-debug-${{ env.VERSION_TAG }}.apk" \;
50+
find app/build/outputs/apk/release/ -name "*.apk" -exec mv {} "release-${{ env.VERSION_TAG }}.apk" \;
51+
find app/build/outputs/apk/debug/ -name "*.apk" -exec mv {} "debug-${{ env.VERSION_TAG }}.apk" \;
5252
5353
- name: Create Release
5454
uses: softprops/action-gh-release@v2
5555
with:
5656
tag_name: ${{ env.VERSION_TAG }}
5757
body_path: release_body.md
5858
files: |
59-
wifitoolbox-release-${{ env.VERSION_TAG }}.apk
60-
wifitoolbox-debug-${{ env.VERSION_TAG }}.apk
59+
release-${{ env.VERSION_TAG }}.apk
60+
debug-${{ env.VERSION_TAG }}.apk
6161
env:
6262
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# v3.0.0 Alpha-02
1+
# v3.0.0_Alpha-02
22

3+
功能更新:
34
- 增加异常重试,每次等待一定时间,多次重试无效等待时间翻倍,等待期间不影响其他任务执行(至此运行参数所有内容均生效)
45
- 实现了一些连接使用系统API连接wifi的方式(虽然有些Bug)
56
- 重构了部分逻辑
7+
- 增加更新日志
68

79
其他:
8-
- 此版本使用Github Actions构建.
10+
- 此版本使用Github Actions构建
911

1012
其他功能正在画饼中……
1113

12-
# v3.0.0 Alpha-01
14+
# v3.0.0_Alpha-01
1315

1416
只能使用Shizuku激活使用,不支持root、不支持无shizuku
1517
主页点左上角菜单打开密码字典破解使用

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ dependencies {
8989
implementation(libs.preference)
9090
implementation(libs.androidx.compose.runtime.annotation)
9191
implementation(libs.androidx.compose.material3.adaptive.navigation.suite)
92+
implementation(libs.compose.markdown)
9293

9394
implementation(libs.materialKolor)
9495

app/src/main/java/com/wifi/toolbox/ui/screen/AboutScreen.kt

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,60 @@ import androidx.compose.foundation.layout.Column
66
import androidx.compose.foundation.layout.fillMaxSize
77
import androidx.compose.foundation.layout.padding
88
import androidx.compose.foundation.layout.size
9+
import androidx.compose.foundation.rememberScrollState
910
import androidx.compose.foundation.shape.RoundedCornerShape
11+
import androidx.compose.foundation.verticalScroll
1012
import androidx.compose.material.icons.Icons
1113
import androidx.compose.material.icons.filled.Menu
14+
import androidx.compose.material3.AlertDialog
1215
import androidx.compose.material3.Button
1316
import androidx.compose.material3.ExperimentalMaterial3Api
1417
import androidx.compose.material3.Icon
1518
import androidx.compose.material3.IconButton
1619
import androidx.compose.material3.Scaffold
1720
import androidx.compose.material3.Text
21+
import androidx.compose.material3.TextButton
1822
import androidx.compose.material3.TopAppBar
1923
import androidx.compose.material3.TopAppBarDefaults
2024
import androidx.compose.runtime.Composable
25+
import androidx.compose.runtime.LaunchedEffect
26+
import androidx.compose.runtime.getValue
27+
import androidx.compose.runtime.mutableStateOf
2128
import androidx.compose.runtime.remember
29+
import androidx.compose.runtime.setValue
2230
import androidx.compose.ui.Alignment
2331
import androidx.compose.ui.Modifier
2432
import androidx.compose.ui.draw.clip
2533
import androidx.compose.ui.graphics.Color
2634
import androidx.compose.ui.layout.ContentScale
2735
import androidx.compose.ui.platform.LocalContext
2836
import androidx.compose.ui.res.painterResource
37+
import androidx.compose.ui.res.stringResource
2938
import androidx.compose.ui.unit.dp
39+
import coil3.compose.rememberAsyncImagePainter
3040
import com.wifi.toolbox.MyApplication
3141
import com.wifi.toolbox.R
32-
import coil3.compose.rememberAsyncImagePainter
42+
import dev.jeziellago.compose.markdowntext.MarkdownText
3343

3444
@OptIn(ExperimentalMaterial3Api::class)
3545
@Composable
3646
fun AboutScreen(onMenuClick: () -> Unit) {
37-
val app = LocalContext.current.applicationContext as MyApplication
47+
val context = LocalContext.current
48+
val app = context.applicationContext as MyApplication
49+
50+
var showDialog by remember { mutableStateOf(false) }
51+
var changelogText by remember { mutableStateOf("") }
52+
53+
LaunchedEffect(showDialog) {
54+
if (showDialog && changelogText.isEmpty()) {
55+
changelogText = try {
56+
context.assets.open("CHANGELOG.md").bufferedReader().use { it.readText() }
57+
} catch (e: Exception) {
58+
""
59+
}
60+
}
61+
}
62+
3863
Box(
3964
modifier = Modifier.fillMaxSize(),
4065
) {
@@ -44,6 +69,7 @@ fun AboutScreen(onMenuClick: () -> Unit) {
4469
modifier = Modifier.fillMaxSize(),
4570
contentScale = ContentScale.FillBounds
4671
)
72+
4773
Scaffold(
4874
topBar = {
4975
TopAppBar(
@@ -69,33 +95,52 @@ fun AboutScreen(onMenuClick: () -> Unit) {
6995
.fillMaxSize(),
7096
contentAlignment = Alignment.Center,
7197
) {
72-
Column {
73-
Text("前面的区域,以后再来探索吧")
74-
Button(
75-
onClick = { app.alert("标题", "点什么点") }
76-
) {
77-
Text("test")
78-
}
79-
val context = LocalContext.current
80-
// 获取 AdaptiveIconDrawable 并包装
98+
Column(horizontalAlignment = Alignment.CenterHorizontally) {
8199
val drawable = remember(R.mipmap.ic_launcher) {
82100
context.packageManager.getDrawable(
83101
context.packageName,
84102
R.mipmap.ic_launcher,
85103
context.applicationInfo
86104
)
87105
}
88-
89106
Image(
90-
// 使用 rememberDrawablePainter 包装 Drawable
91-
painter = rememberAsyncImagePainter(model = R.mipmap.ic_launcher),
107+
painter = rememberAsyncImagePainter(model = drawable),
92108
contentDescription = "App Icon",
93109
modifier = Modifier
94110
.size(108.dp)
95111
.clip(RoundedCornerShape(16.dp))
96112
)
113+
Text(stringResource(R.string.app_name))
114+
Button(
115+
onClick = { showDialog = true }
116+
) {
117+
Text("更新日志")
118+
}
97119
}
98120
}
99121
}
122+
123+
if (showDialog) {
124+
AlertDialog(
125+
onDismissRequest = { showDialog = false },
126+
confirmButton = {
127+
TextButton(onClick = { showDialog = false }) {
128+
Text("确定")
129+
}
130+
},
131+
title = { Text("更新日志") },
132+
text = {
133+
Box(
134+
modifier = Modifier
135+
.verticalScroll(rememberScrollState())
136+
) {
137+
MarkdownText(
138+
modifier = Modifier.padding(8.dp),
139+
markdown = changelogText,
140+
)
141+
}
142+
}
143+
)
144+
}
100145
}
101-
}
146+
}

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
agp = "8.13.2"
33
coilCompose = "3.3.0"
44
composeBomVersion = "2025.12.01"
5+
composeMarkdown = "0.5.0"
56
desugar_jdk_libs = "2.1.5"
67
hiddenapibypass = "6.1"
78
kotlin = "2.3.0"
@@ -32,6 +33,7 @@ androidx-compose-material-icons-extended = { module = "androidx.compose.material
3233
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
3334
api = { module = "dev.rikka.shizuku:api", version.ref = "shizukuVersion" }
3435
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coilCompose" }
36+
compose-markdown = { module = "com.github.jeziellago:compose-markdown", version.ref = "composeMarkdown" }
3537
desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
3638
hiddenapibypass = { module = "org.lsposed.hiddenapibypass:hiddenapibypass", version.ref = "hiddenapibypass" }
3739
junit = { group = "junit", name = "junit", version.ref = "junit" }

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencyResolutionManagement {
1515
repositories {
1616
google()
1717
mavenCentral()
18+
maven { url = uri("https://jitpack.io") }
1819
}
1920
}
2021

0 commit comments

Comments
 (0)