wip
This commit is contained in:
parent
2e9b4f5d19
commit
4f379adfb7
|
@ -69,6 +69,12 @@ final class Client: ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
extension Client: Identifiable {
|
||||
var id: String {
|
||||
credentials.bareJid
|
||||
}
|
||||
}
|
||||
|
||||
extension Client {
|
||||
func addRoster(_ jid: String, name: String?, groups: [String]) async throws {
|
||||
_ = try await connection.module(.roster).addItem(
|
||||
|
|
|
@ -76,4 +76,5 @@
|
|||
// MARK: Settings
|
||||
"Settings.Main.title" = "Settings";
|
||||
"Settings.Section.Accounts.title" = "Accounts";
|
||||
"Settings.Section.Accounts.add" = "Add new account";
|
||||
|
||||
|
|
|
@ -23,42 +23,18 @@ struct SettingsScreen: View {
|
|||
|
||||
ForEach(clientsStore.clients) { client in
|
||||
SharedListRow(
|
||||
iconType: .image(Image(systemName: "person.fill"), .Material.Elements.active),
|
||||
text: "name",
|
||||
iconType: .charCircle(client.credentials.bareJid),
|
||||
text: client.credentials.bareJid,
|
||||
controlType: .none
|
||||
)
|
||||
.onTapGesture {
|
||||
print("Tapped client: \(client.name)")
|
||||
print("Tapped account \(client.credentials.bareJid)")
|
||||
}
|
||||
}
|
||||
|
||||
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.createGroup,
|
||||
controlType: .none
|
||||
)
|
||||
.onTapGesture {
|
||||
print("Tapped createGroup")
|
||||
}
|
||||
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.createGroup,
|
||||
iconType: .image(Image(systemName: "plus"), .Material.Elements.active),
|
||||
text: L10n.Settings.Section.Accounts.add,
|
||||
controlType: .none
|
||||
)
|
||||
.onTapGesture {
|
||||
|
@ -70,7 +46,7 @@ struct SettingsScreen: View {
|
|||
SharedSectionTitle(text: "Dev tools")
|
||||
|
||||
SharedListRow(
|
||||
iconType: .image(Image(systemName: "xmark.octagon"), .Material.Elements.active),
|
||||
iconType: .image(Image(systemName: "xmark.octagon"), .Rainbow.red500),
|
||||
text: "Clean all data",
|
||||
controlType: .none
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue