// MARK: - Blind Box Navigation Bar import SwiftUI struct BlindBoxNavigationBar: View { let memberProfile: MemberProfile? let showLogin: Bool let showUserProfile: () -> Void var body: some View { HStack { // 设置按钮 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() NavigationLink(destination: SubscribeView()) { Text("\(memberProfile?.remainPoints ?? 0)") .font(Typography.font(for: .subtitle)) .fontWeight(.bold) .padding(.horizontal, 12) .padding(.vertical, 6) .background(Color.black) .foregroundColor(.white) .cornerRadius(16) } .padding(.trailing) .fullScreenCover(isPresented: .constant(showLogin)) { LoginView() } } .padding(.horizontal) .padding(.top, 20) } }