feat: 去掉盲盒按钮
This commit is contained in:
parent
62327164a2
commit
c221f91412
@ -20,6 +20,8 @@ struct ReturnButton: View {
|
||||
.font(Typography.font(for: iconSize))
|
||||
.fontWeight(.medium)
|
||||
.foregroundColor(iconColor)
|
||||
.padding(10) // 增加内边距来扩大点击区域
|
||||
.contentShape(Rectangle()) // 使整个区域可点击
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
|
||||
@ -645,7 +645,10 @@ struct BlindBoxView: View {
|
||||
Button(action: showUserProfile) {
|
||||
SVGImage(svgName: "User")
|
||||
.frame(width: 24, height: 24)
|
||||
.padding(13) // Increases tap area while keeping visual size
|
||||
.contentShape(Rectangle()) // Makes the padded area tappable
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle()) // Prevents the button from affecting the layout
|
||||
|
||||
Spacer()
|
||||
// // 测试质感页面入口
|
||||
|
||||
@ -31,6 +31,7 @@ struct UserProfileModal: View {
|
||||
@State private var isLoading = false
|
||||
@State private var errorMessage: String?
|
||||
@State private var isCopied = false
|
||||
@State private var isContentReady = false
|
||||
|
||||
init(showModal: Binding<Bool>, showSettings: Binding<Bool>, isMember: Binding<Bool>, memberDate: Binding<String>) {
|
||||
self._showModal = showModal
|
||||
@ -51,8 +52,14 @@ struct UserProfileModal: View {
|
||||
Text(error)
|
||||
.foregroundColor(.red)
|
||||
.padding()
|
||||
} else if let userProfile = userProfile {
|
||||
} else if isContentReady, let userProfile = userProfile {
|
||||
userProfileView(userProfile: userProfile)
|
||||
.opacity(isContentReady ? 1 : 0)
|
||||
.animation(.easeInOut(duration: 0.3), value: isContentReady)
|
||||
} else {
|
||||
// Empty view with same dimensions to prevent layout shifts
|
||||
Color.clear
|
||||
.frame(height: UIScreen.main.bounds.height * 0.7)
|
||||
}
|
||||
}
|
||||
.frame(width: UIScreen.main.bounds.width * 0.8)
|
||||
@ -60,6 +67,12 @@ struct UserProfileModal: View {
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
.onAppear {
|
||||
fetchUserInfo()
|
||||
// Delay content appearance to sync with modal animation
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||
withAnimation {
|
||||
isContentReady = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,26 +197,26 @@ struct UserProfileModal: View {
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
|
||||
// Box
|
||||
Button(action: {
|
||||
Router.shared.navigate(to: .mediaUpload)
|
||||
}) {
|
||||
HStack(spacing: 16) {
|
||||
SVGImage(svgName: "Box")
|
||||
.foregroundColor(.orange)
|
||||
.frame(width: 20, height: 20)
|
||||
// Button(action: {
|
||||
// Router.shared.navigate(to: .mediaUpload)
|
||||
// }) {
|
||||
// HStack(spacing: 16) {
|
||||
// SVGImage(svgName: "Box")
|
||||
// .foregroundColor(.orange)
|
||||
// .frame(width: 20, height: 20)
|
||||
|
||||
Text("My Blind Box")
|
||||
.font(Typography.font(for: .body))
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.themeTextMessageMain)
|
||||
// Text("My Blind Box")
|
||||
// .font(Typography.font(for: .body))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.themeTextMessageMain)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
.cornerRadius(10)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
// Spacer()
|
||||
// }
|
||||
// .padding()
|
||||
// .cornerRadius(10)
|
||||
// .contentShape(Rectangle())
|
||||
// }
|
||||
// .buttonStyle(PlainButtonStyle())
|
||||
|
||||
// setting
|
||||
Button(action: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user