diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/user/UserProfilePage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/user/UserProfilePage.kt
index 289c943b..9dbd8248 100644
--- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/user/UserProfilePage.kt
+++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/user/UserProfilePage.kt
@@ -37,6 +37,8 @@ import androidx.compose.material.icons.outlined.ContentCopy
import androidx.compose.material.icons.rounded.Add
import androidx.compose.material.icons.rounded.Edit
import androidx.compose.material.icons.rounded.NoAccounts
+import androidx.compose.material.icons.rounded.SupervisedUserCircle
+import androidx.compose.material.icons.rounded.Verified
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.LaunchedEffect
@@ -252,7 +254,7 @@ fun UserProfilePage(
}
}
}
- }
+ },
)
}
) { paddingValues ->
@@ -656,10 +658,48 @@ private fun UserProfileDetail(
Text(
text = user.get { intro }.takeIf { it.isNotEmpty() }
?: stringResource(id = R.string.tip_no_intro),
- style = MaterialTheme.typography.body1,
+ style = MaterialTheme.typography.body2,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
+ user.getNullableImmutable { bazhu_grade }?.let {
+ Row(
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.spacedBy(8.dp)
+ ) {
+ Icon(
+ imageVector = Icons.Rounded.SupervisedUserCircle,
+ contentDescription = null,
+ modifier = Modifier.size(16.dp),
+ tint = ExtendedTheme.colors.primary,
+ )
+ Text(
+ text = it.get { desc },
+ style = MaterialTheme.typography.body2,
+ color = ExtendedTheme.colors.primary,
+ )
+ }
+ }
+ user.getNullableImmutable { new_god_data }
+ ?.takeIf { it.get { status } != 0 }
+ ?.let {
+ Row(
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.spacedBy(8.dp)
+ ) {
+ Icon(
+ imageVector = Icons.Rounded.Verified,
+ contentDescription = null,
+ modifier = Modifier.size(16.dp),
+ tint = ExtendedTheme.colors.primary,
+ )
+ Text(
+ text = stringResource(id = R.string.text_god_verify, it.get { field_name }),
+ style = MaterialTheme.typography.body2,
+ color = ExtendedTheme.colors.primary,
+ )
+ }
+ }
val sexEmoji = when (user.get { sex }) {
1 -> "♂"
2 -> "♀"
diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Toolbar.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Toolbar.kt
index a1782a0d..4d23c10b 100644
--- a/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Toolbar.kt
+++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Toolbar.kt
@@ -295,6 +295,8 @@ fun Toolbar(
title: @Composable (() -> Unit),
navigationIcon: (@Composable () -> Unit)? = null,
actions: @Composable RowScope.() -> Unit = {},
+ backgroundColor: Color = ExtendedTheme.colors.topBar,
+ contentColor: Color = ExtendedTheme.colors.onTopBar,
content: (@Composable ColumnScope.() -> Unit)? = null,
) {
TopAppBarContainer(
@@ -302,21 +304,21 @@ fun Toolbar(
TopAppBar(
title = {
ProvideTextStyle(value = MaterialTheme.typography.h6.copy(fontWeight = FontWeight.Bold)) {
- ProvideContentColor(color = ExtendedTheme.colors.onTopBar, content = title)
+ ProvideContentColor(color = contentColor, content = title)
}
},
actions = {
- ProvideContentColor(color = ExtendedTheme.colors.onTopBar) {
+ ProvideContentColor(color = contentColor) {
actions()
}
},
navigationIcon = (@Composable {
- ProvideContentColor(color = ExtendedTheme.colors.onTopBar) {
+ ProvideContentColor(color = contentColor) {
navigationIcon?.invoke()
}
}).takeIf { navigationIcon != null },
- backgroundColor = ExtendedTheme.colors.topBar,
- contentColor = ExtendedTheme.colors.onTopBar,
+ backgroundColor = backgroundColor,
+ contentColor = contentColor,
elevation = 0.dp
)
},
diff --git a/app/src/main/protos/BazhuSign.proto b/app/src/main/protos/BazhuSign.proto
new file mode 100644
index 00000000..640b7e71
--- /dev/null
+++ b/app/src/main/protos/BazhuSign.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message BazhuSign {
+ string desc = 1;
+ string level = 2;
+}
diff --git a/app/src/main/protos/GodInfo.proto b/app/src/main/protos/GodInfo.proto
new file mode 100644
index 00000000..97baea54
--- /dev/null
+++ b/app/src/main/protos/GodInfo.proto
@@ -0,0 +1,17 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message GodInfo {
+ int64 id = 1;
+ string intro = 2;
+ int32 type = 3;
+ int64 fid = 4;
+ int32 followed = 5;
+ string recommend_reason = 6;
+ string forum_name = 7;
+ int32 can_send_msg = 8;
+ string prefix = 9;
+}
diff --git a/app/src/main/protos/Icon.proto b/app/src/main/protos/Icon.proto
new file mode 100644
index 00000000..76f59542
--- /dev/null
+++ b/app/src/main/protos/Icon.proto
@@ -0,0 +1,19 @@
+syntax = "proto3";
+
+import "Position.proto";
+import "Terminal.proto";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message Icon {
+ string name = 1;
+ int32 weight = 2;
+ string url = 3;
+ string icon = 4;
+ int32 value = 5;
+ Terminal terminal = 6;
+ Position position = 7;
+ repeated string sprite_info = 8;
+}
diff --git a/app/src/main/protos/LikeForumInfo.proto b/app/src/main/protos/LikeForumInfo.proto
new file mode 100644
index 00000000..293dba00
--- /dev/null
+++ b/app/src/main/protos/LikeForumInfo.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message LikeForumInfo {
+ string forum_name = 1;
+ uint64 forum_id = 2;
+}
diff --git a/app/src/main/protos/NewGodInfo.proto b/app/src/main/protos/NewGodInfo.proto
new file mode 100644
index 00000000..175ab6bd
--- /dev/null
+++ b/app/src/main/protos/NewGodInfo.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message NewGodInfo {
+ int32 status = 1;
+ uint32 field_id = 2;
+ string field_name = 3;
+ uint32 type = 4;
+ string type_name = 5;
+}
diff --git a/app/src/main/protos/Position.proto b/app/src/main/protos/Position.proto
new file mode 100644
index 00000000..fa5d3750
--- /dev/null
+++ b/app/src/main/protos/Position.proto
@@ -0,0 +1,12 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message Position {
+ int32 frs = 1;
+ int32 pb = 2;
+ int32 home = 3;
+ int32 card = 4;
+}
diff --git a/app/src/main/protos/Terminal.proto b/app/src/main/protos/Terminal.proto
new file mode 100644
index 00000000..28ef6baf
--- /dev/null
+++ b/app/src/main/protos/Terminal.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message Terminal {
+ int32 pc = 1;
+ int32 wap = 2;
+ int32 client = 3;
+}
diff --git a/app/src/main/protos/User.proto b/app/src/main/protos/User.proto
index 4eca08fe..583160b1 100644
--- a/app/src/main/protos/User.proto
+++ b/app/src/main/protos/User.proto
@@ -1,5 +1,14 @@
syntax = "proto3";
+
+import "BawuThrones.proto";
+import "BazhuSign.proto";
+import "GodInfo.proto";
+import "Icon.proto";
+import "LikeForumInfo.proto";
+import "NewGodInfo.proto";
+import "UserPics.proto";
import "PrivSets.proto";
+import "SimpleUser.proto";
package tieba;
@@ -15,30 +24,77 @@ message User {
int32 type = 7;
int32 userhide = 9;
int32 is_manager = 11;
+ string rank = 12;
+ string bimg_url = 13;
+ int32 meizhi_level = 14;
+ int32 is_verify = 15;
+ int32 is_interestman = 16;
+ repeated Icon iconinfo = 17;
+ int32 user_type = 19;
+ int32 is_coreuser = 20;
+ int32 is_huinibuke = 21;
+ string ios_bimg_format = 22;
int32 level_id = 23;
+ int32 is_like = 24;
int32 is_bawu = 25;
string bawu_type = 26;
string portraith = 27;
+ string ip = 28;
+ string BDUSS = 29;
int32 fans_num = 30;
int32 concern_num = 31;
int32 sex = 32;
int32 my_like_num = 33;
string intro = 34;
int32 has_concerned = 35;
+ string passwd = 36;
int32 post_num = 37;
string tb_age = 38;
+ int32 is_mem = 39;
+ int32 bimg_end_time = 40;
int32 gender = 42;
+ int32 is_mask = 43;
+ repeated UserPics user_pics = 44;
PrivSets privSets = 45;
+ int32 is_friend = 46;
+ repeated LikeForumInfo likeForum = 47;
+ int32 gift_num = 49;
+ int32 is_select_tail = 51;
+ int32 is_guanfang = 52;
+ int32 bookmark_count = 53;
+ int32 bookmark_new_count = 54;
+ repeated SimpleUser mute_user = 55;
int64 friend_num = 56;
string fansNickname = 57;
+ string bg_pic = 58;
+ GodInfo god_data = 62;
+ int32 heavy_user = 63;
int32 visitor_num = 75;
int32 total_visitor_num = 76;
+ int32 nickname_update_time = 86;
int32 thread_num = 87;
int32 agree_num = 88;
+ int32 left_call_num = 89;
+ int32 is_invited = 90;
+ int32 is_fans = 91;
int32 priv_thread = 92;
+ int32 is_videobiggie = 93;
+ int32 is_show_redpacket = 94;
+ int32 can_modify_avatar = 97;
+ string modify_avatar_desc = 98;
+ int32 influence = 99;
+ string level_influence = 100;
+ optional NewGodInfo new_god_data = 101;
+ BawuThrones bawu_thrones = 103;
+ BazhuSign bazhu_grade = 105;
int32 isDefaultAvatar = 106;
int32 favorite_num = 109;
uint32 total_agree_num = 118;
string level_name = 125;
string ip_address = 127;
+ int32 is_nickname_editing = 128;
+ string editing_nickname = 129;
+ string display_intro = 138;
+ repeated string new_icon_url = 139;
+ string dynamic_url = 140;
}
\ No newline at end of file
diff --git a/app/src/main/protos/UserPics.proto b/app/src/main/protos/UserPics.proto
new file mode 100644
index 00000000..a061fcfc
--- /dev/null
+++ b/app/src/main/protos/UserPics.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package tieba;
+
+option java_package = "com.huanchengfly.tieba.post.api.models.protos";
+
+message UserPics {
+ string big = 1;
+ string small = 2;
+}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3b62f290..a07a6b9b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -760,4 +760,5 @@
添加到黑名单
添加到白名单
屏蔽选项
+ %s领域大神