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