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 { struct MessageCenterView: View {
@Environment(\.presentationMode) var presentationMode // @Environment(\.presentationMode) var presentationMode
var body: some View { var body: some View {
NavigationView(content: { NavigationView(content: {
@@ -31,7 +31,7 @@ struct MessageCenterView: View {
HStack{ HStack{
Button(action: { Button(action: {
presentationMode.wrappedValue.dismiss() // presentationMode.wrappedValue.dismiss()
}, label: { }, label: {
Image(systemName: "chevron.left") Image(systemName: "chevron.left")
@@ -39,7 +39,7 @@ struct MessageCenterView: View {
Text("返回") Text("返回")
.foregroundColor(.white) .foregroundColor(.white)
}).padding(10) // }).padding(10)
Spacer(minLength: 0) Spacer(minLength: 0)
} }
@@ -68,7 +68,7 @@ struct MessageCenterView: View {
}) })
.navigationBarHidden(true) .navigationBarHidden(true)
.navigationBarBackButtonHidden(true) // .navigationBarBackButtonHidden(true)
} }
@@ -48,7 +48,7 @@ struct SideMenuView: View {
HStack{ HStack{
Button(action: { Button(action: {
isPresented = false // Close the side menu isPresented = false
}, label: { }, label: {
Image(systemName: "chevron.left") Image(systemName: "chevron.left")
@@ -56,7 +56,7 @@ struct SideMenuView: View {
Text("返回") Text("返回")
.foregroundColor(.white) .foregroundColor(.white)
}).padding(10) // }).padding(10)
Spacer(minLength: 0) Spacer(minLength: 0)
} }
@@ -129,7 +129,7 @@ struct SideMenuView: View {
Text(errorMessage) Text(errorMessage)
.bold() .bold()
.foregroundColor(.red) .foregroundColor(.red)
.multilineTextAlignment(.center) // .multilineTextAlignment(.center)
.padding() .padding()
}else{ }else{
@@ -162,9 +162,9 @@ struct SideMenuView: View {
Color.red 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( .background(
RoundedRectangle(cornerRadius: 10) RoundedRectangle(cornerRadius: 10)
.fill( .fill(
@@ -214,23 +214,23 @@ struct SideMenuView: View {
NavigationLink(destination: SupportTicketView()) { NavigationLink(destination: SupportTicketView()) {
MenuItem(icon: "listclipboard", title: "我的工单", color: .white, isNew: false) MenuItem(icon: "listclipboard", title: "我的工单", color: .white, isNew: false)
} }
Divider() // 线 Divider()
if (paymentURLKey.count > 3){ if (paymentURLKey.count > 3){
NavigationLink(destination: UpgradeView()) { NavigationLink(destination: UpgradeView()) {
MenuItem(icon: "crown.fill", title: "升级套餐", color: .yellow, isNew: true) MenuItem(icon: "crown.fill", title: "升级套餐", color: .yellow, isNew: true)
} }
Divider() // 线 Divider()
NavigationLink(destination: OrderListView()) { NavigationLink(destination: OrderListView()) {
MenuItem(icon: "checkout", title: "我的订单", color: .white, isNew: false) MenuItem(icon: "checkout", title: "我的订单", color: .white, isNew: false)
} }
Divider() // 线 Divider()
NavigationLink(destination: InviteListView(isPresented: $isInviteActive)) { NavigationLink(destination: InviteListView(isPresented: $isInviteActive)) {
MenuItem(icon: "star.fill", title: "邀请中心", color: .white, isNew: false) MenuItem(icon: "star.fill", title: "邀请中心", color: .white, isNew: false)
} }
Divider() // 线 Divider()
}else{ }else{
@@ -238,7 +238,7 @@ struct SideMenuView: View {
NavigationLink(destination: MessageCenterView()) { NavigationLink(destination: MessageCenterView()) {
MenuItem(icon: "message.badge.circle", title: "消息通知", color: .white, isNew: false) 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) MenuItem(icon: "questionmark.app", title: "问题解答", color: .white, isNew: false)
} }
Divider() // 线 Divider()
NavigationLink(destination: SupportView()) { NavigationLink(destination: SupportView()) {
MenuItem(icon: "headphones", title: "联系客服", color: .white, isNew: false) MenuItem(icon: "headphones", title: "联系客服", color: .white, isNew: false)
} }
Divider() // 线 Divider()
NavigationLink(destination: AboutUsView()) { NavigationLink(destination: AboutUsView()) {
MenuItem(icon: "info.circle.fill", title: "关于我们", color: .white, isNew: false) MenuItem(icon: "info.circle.fill", title: "关于我们", color: .white, isNew: false)
} }
Divider() // 线 Divider()
}).padding() }).padding()
Button(action: { Button(action: {