Move Relay Add Button to Section Header
This commit is contained in:
committed by
William Casarin
parent
abf736ec2a
commit
7f71ddce1d
@@ -54,10 +54,19 @@ struct ConfigView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack(alignment: .leading) {
|
ZStack(alignment: .leading) {
|
||||||
Form {
|
Form {
|
||||||
Section("Relays") {
|
Section {
|
||||||
List(Array(relays), id: \.url) { relay in
|
List(Array(relays), id: \.url) { relay in
|
||||||
RelayView(state: state, relay: relay.url.absoluteString)
|
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") {
|
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")
|
.navigationTitle("Settings")
|
||||||
.navigationBarTitleDisplayMode(.large)
|
.navigationBarTitleDisplayMode(.large)
|
||||||
|
|||||||
Reference in New Issue
Block a user