UI样式优化
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
// border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
|
||||
.common-popup__title {
|
||||
font-family: "PingFang SC";
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 20px;
|
||||
border-radius: 999px;
|
||||
|
||||
.follow_button {
|
||||
display: flex;
|
||||
|
||||
@@ -72,10 +72,10 @@ const UserInfoCardComponent: React.FC<UserInfoCardProps> = ({
|
||||
onTab,
|
||||
}) => {
|
||||
const { updateUserInfo } = useUserActions();
|
||||
|
||||
|
||||
// 使用 useRef 记录上一次的 user_info,只在真正变化时打印
|
||||
const prevUserInfoRef = useRef<Partial<UserInfoType>>();
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// 只在 user_info 真正变化时打印(通过 JSON 序列化比较)
|
||||
const prevStr = JSON.stringify(prevUserInfoRef.current);
|
||||
@@ -85,7 +85,7 @@ const UserInfoCardComponent: React.FC<UserInfoCardProps> = ({
|
||||
prevUserInfoRef.current = user_info;
|
||||
}
|
||||
}, [user_info]);
|
||||
|
||||
|
||||
// 编辑个人简介弹窗状态
|
||||
const [edit_modal_visible, setEditModalVisible] = useState(false);
|
||||
const [editing_field, setEditingField] = useState<string>("");
|
||||
@@ -507,13 +507,13 @@ const UserInfoCardComponent: React.FC<UserInfoCardProps> = ({
|
||||
</View>
|
||||
) : null}
|
||||
</View>
|
||||
<View className="personal_profile">
|
||||
<View className="personal_profile"
|
||||
onClick={() => handle_open_edit_modal("personal_profile")}>
|
||||
{user_info.personal_profile ? (
|
||||
<Text className="bio_text">{user_info.personal_profile}</Text>
|
||||
) : is_current_user ? (
|
||||
<View
|
||||
className="personal_profile_edit"
|
||||
onClick={() => handle_open_edit_modal("personal_profile")}
|
||||
>
|
||||
<Image
|
||||
className="edit_icon"
|
||||
@@ -622,7 +622,7 @@ const arePropsEqual = (prevProps: UserInfoCardProps, nextProps: UserInfoCardProp
|
||||
// 使用 JSON.stringify 进行深度比较(注意:对于复杂对象可能有性能问题)
|
||||
const prevUserInfoStr = JSON.stringify(prevProps.user_info);
|
||||
const nextUserInfoStr = JSON.stringify(nextProps.user_info);
|
||||
|
||||
|
||||
return (
|
||||
prevUserInfoStr === nextUserInfoStr &&
|
||||
prevProps.editable === nextProps.editable &&
|
||||
@@ -767,9 +767,8 @@ export const GameTabs: React.FC<GameTabsProps> = ({
|
||||
<Text className="tab_text">{hosted_text}</Text>
|
||||
</View>
|
||||
<View
|
||||
className={`tab_item ${
|
||||
active_tab === "participated" ? "active" : ""
|
||||
}`}
|
||||
className={`tab_item ${active_tab === "participated" ? "active" : ""
|
||||
}`}
|
||||
onClick={() => on_tab_change("participated")}
|
||||
>
|
||||
<Text className="tab_text">{participated_text}</Text>
|
||||
|
||||
@@ -225,4 +225,8 @@ $nut-primary-color-end: #000000 !important;
|
||||
color: #ffffff !important;
|
||||
background: #000000 !important;
|
||||
border: 1px solid #000000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.nut-popup-bottom.nut-popup-round {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.33337 14H14.3334" stroke="black" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3.66663 8.90663V11.3333H6.10569L13 4.43603L10.565 2L3.66663 8.90663Z" stroke="black" stroke-width="1.33333" stroke-linejoin="round"/>
|
||||
<path d="M2.33337 14H14.3334" stroke="rgba(0, 0, 0, 0.65)" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3.66663 8.90663V11.3333H6.10569L13 4.43603L10.565 2L3.66663 8.90663Z" stroke="rgba(0, 0, 0, 0.65)" stroke-width="1.33333" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 392 B |
@@ -110,7 +110,7 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
background-color: #ffffff;
|
||||
background-color: #fafafa;
|
||||
padding: 20px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.wallet_page {
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
background-color: #f5f5f5;
|
||||
background-color: #fafafa;
|
||||
padding-bottom: 5px;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user