add new View

This commit is contained in:
zeus
2025-08-03 23:09:23 +08:00
parent f788fbea98
commit d1321e8fa2
2 changed files with 18 additions and 18 deletions
@@ -21,7 +21,7 @@ import SwiftUI
struct MessageCenterView: View {
@Environment(\.presentationMode) var presentationMode //
@Environment(\.presentationMode) var presentationMode
var body: some View {
NavigationView(content: {
@@ -31,7 +31,7 @@ struct MessageCenterView: View {
HStack{
Button(action: {
presentationMode.wrappedValue.dismiss() //
presentationMode.wrappedValue.dismiss()
}, label: {
Image(systemName: "chevron.left")
@@ -39,7 +39,7 @@ struct MessageCenterView: View {
Text("返回")
.foregroundColor(.white)
}).padding(10) //
}).padding(10)
Spacer(minLength: 0)
}
@@ -68,7 +68,7 @@ struct MessageCenterView: View {
})
.navigationBarHidden(true)
.navigationBarBackButtonHidden(true) //
.navigationBarBackButtonHidden(true)
}
@@ -48,7 +48,7 @@ struct SideMenuView: View {
HStack{
Button(action: {
isPresented = false // Close the side menu
isPresented = false
}, label: {
Image(systemName: "chevron.left")
@@ -56,7 +56,7 @@ struct SideMenuView: View {
Text("返回")
.foregroundColor(.white)
}).padding(10) //
}).padding(10)
Spacer(minLength: 0)
}
@@ -129,7 +129,7 @@ struct SideMenuView: View {
Text(errorMessage)
.bold()
.foregroundColor(.red)
.multilineTextAlignment(.center) //
.multilineTextAlignment(.center)
.padding()
}else{
@@ -162,9 +162,9 @@ struct SideMenuView: View {
Color.red
)
)
Spacer() // Fill the remaining space to push the white rectangle to the left
Spacer()
}
.frame(height: 20) // Set the total width and height for the bar
.frame(height: 20)
.background(
RoundedRectangle(cornerRadius: 10)
.fill(
@@ -214,23 +214,23 @@ struct SideMenuView: View {
NavigationLink(destination: SupportTicketView()) {
MenuItem(icon: "listclipboard", title: "我的工单", color: .white, isNew: false)
}
Divider() // 线
Divider()
if (paymentURLKey.count > 3){
NavigationLink(destination: UpgradeView()) {
MenuItem(icon: "crown.fill", title: "升级套餐", color: .yellow, isNew: true)
}
Divider() // 线
Divider()
NavigationLink(destination: OrderListView()) {
MenuItem(icon: "checkout", title: "我的订单", color: .white, isNew: false)
}
Divider() // 线
Divider()
NavigationLink(destination: InviteListView(isPresented: $isInviteActive)) {
MenuItem(icon: "star.fill", title: "邀请中心", color: .white, isNew: false)
}
Divider() // 线
Divider()
}else{
@@ -238,7 +238,7 @@ struct SideMenuView: View {
NavigationLink(destination: MessageCenterView()) {
MenuItem(icon: "message.badge.circle", title: "消息通知", color: .white, isNew: false)
}
Divider() // 线
Divider()
}
@@ -246,16 +246,16 @@ struct SideMenuView: View {
MenuItem(icon: "questionmark.app", title: "问题解答", color: .white, isNew: false)
}
Divider() // 线
Divider()
NavigationLink(destination: SupportView()) {
MenuItem(icon: "headphones", title: "联系客服", color: .white, isNew: false)
}
Divider() // 线
Divider()
NavigationLink(destination: AboutUsView()) {
MenuItem(icon: "info.circle.fill", title: "关于我们", color: .white, isNew: false)
}
Divider() // 线
Divider()
}).padding()
Button(action: {
@@ -265,7 +265,7 @@ struct SideMenuView: View {
alert = Alert(YesOrNOMessage: "确定退出登录吗?", {
isLogouting=true
UserManager.shared.clearUserData()
//
//
Task {
//await reloadSubscribe()