Browse Source

Move Relay Add Button to Section Header

post-button-style
Joel Klabo 2 years ago
committed by William Casarin
parent
commit
7f71ddce1d
  1. 25
      damus/Views/ConfigView.swift

25
damus/Views/ConfigView.swift

@ -54,10 +54,19 @@ struct ConfigView: View {
var body: some View {
ZStack(alignment: .leading) {
Form {
Section("Relays") {
Section {
List(Array(relays), id: \.url) { relay in
RelayView(state: state, relay: relay.url.absoluteString)
}
} header: {
HStack {
Text("Relays")
Spacer()
Button(action: { show_add_relay = true }) {
Image(systemName: "plus")
.foregroundColor(.accentColor)
}
}
}
Section("Recommended Relays") {
@ -110,20 +119,6 @@ struct ConfigView: View {
}
}
}
VStack {
HStack {
Spacer()
Button(action: { show_add_relay = true }) {
Label("", systemImage: "plus")
.foregroundColor(.accentColor)
.padding()
}
}
Spacer()
}
}
.navigationTitle("Settings")
.navigationBarTitleDisplayMode(.large)

Loading…
Cancel
Save