From 8418d6490de0c4a65aa7b41a85d63e1330bea4ca Mon Sep 17 00:00:00 2001
From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com>
Date: Fri, 21 Jul 2023 14:25:28 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../settings/account/AccountManagePage.kt | 23 +++++++++++++++++++
app/src/main/res/values/strings.xml | 1 +
2 files changed, 24 insertions(+)
diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/account/AccountManagePage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/account/AccountManagePage.kt
index c24f7ffd..78368a1a 100644
--- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/account/AccountManagePage.kt
+++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/account/AccountManagePage.kt
@@ -12,6 +12,7 @@ import androidx.compose.material.icons.outlined.AccountCircle
import androidx.compose.material.icons.outlined.AddCircleOutline
import androidx.compose.material.icons.outlined.ContentCopy
import androidx.compose.material.icons.outlined.Edit
+import androidx.compose.material.icons.outlined.SupervisedUserCircle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.ExperimentalComposeUiApi
@@ -47,6 +48,7 @@ import com.huanchengfly.tieba.post.utils.AccountUtil.AllAccounts
import com.huanchengfly.tieba.post.utils.AccountUtil.LocalAccount
import com.huanchengfly.tieba.post.utils.TiebaUtil
import com.huanchengfly.tieba.post.utils.appPreferences
+import com.huanchengfly.tieba.post.utils.launchUrl
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
@@ -171,6 +173,27 @@ fun AccountManagePage(
},
)
}
+ prefsItem {
+ TextPref(
+ title = stringResource(id = R.string.title_modify_username),
+ onClick = {
+ launchUrl(
+ context,
+ "https://wappass.baidu.com/static/manage-chunk/change-username.html#/showUsername"
+ )
+ },
+ leadingIcon = {
+ LeadingIcon {
+ AvatarIcon(
+ icon = Icons.Outlined.SupervisedUserCircle,
+ size = Sizes.Small,
+ contentDescription = null,
+ )
+ }
+ },
+ enabled = account != null
+ )
+ }
prefsItem {
TextPref(
title = stringResource(id = R.string.title_copy_bduss),
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2439fb9a..3e31294e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -695,4 +695,5 @@
无水印
显示用户名
显示吧名
+ 修改用户名