another.im-ios/ConversationsClassic/View/Main/ChatList/ChatsCreateScreenMain.swift

81 lines
2.7 KiB
Swift
Raw Normal View History

2024-08-07 15:13:43 +00:00
import SwiftUI
struct ChatsCreateScreenMain: View {
@Environment(\.router) var router
2024-08-07 15:13:43 +00:00
var body: some View {
ZStack {
// Background color
Color.Material.Background.light
.ignoresSafeArea()
// Content
VStack(spacing: 0) {
// Header
SharedNavigationBar(
leftButton: .init(
image: Image(systemName: "xmark"),
action: {
router.dismissScreen()
2024-08-07 15:13:43 +00:00
}
),
centerText: .init(text: L10n.Chats.Create.Main.title)
)
// List
List {
2024-10-03 12:54:15 +00:00
// Groups creation buttons
SharedListRow(
iconType: .image(Image(systemName: "person.2.fill"), .Material.Elements.active),
text: L10n.Chats.Create.Main.createGroup,
controlType: .none
)
.onTapGesture {
print("Tapped createGroup")
}
SharedListRow(
iconType: .image(Image(systemName: "person.2.fill"), .Material.Elements.active),
text: L10n.Chats.Create.Main.createPrivateGroup,
controlType: .none
).onTapGesture {
print("Tapped createPrivateGroup")
}
// Channel buttons
SharedListRow(
iconType: .image(Image(systemName: "globe.americas"), .Material.Elements.active),
text: L10n.Chats.Create.Main.createChannel,
controlType: .none
).onTapGesture {
print("Tapped createChannel")
}
SharedListRow(
iconType: .image(Image(systemName: "magnifyingglass"), .Material.Elements.active),
text: L10n.Chats.Create.Main.findChannel,
controlType: .none
).onTapGesture {
print("Tapped findChannel")
}
2024-08-07 19:07:39 +00:00
2024-08-07 18:08:46 +00:00
// for contacts list
// let rosters = store.state.rostersState.rosters.filter { !$0.locallyDeleted }
// if rosters.isEmpty {
// ChatsCreateRowSeparator()
// }
2024-08-07 15:13:43 +00:00
}
.listStyle(.plain)
Spacer()
}
}
}
}
2024-08-07 18:08:46 +00:00
private struct ChatsCreateRowSeparator: View {
var body: some View {
Text("aa")
}
}