damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 7f71ddce1dfc844d50f22f16000c46f35bd9c4d7
parent abf736ec2ac93b087cc0b860100eea1570f41e5f
Author: Joel Klabo <joelklabo@gmail.com>
Date:   Thu, 29 Dec 2022 17:58:56 -0800

Move Relay Add Button to Section Header

Diffstat:
Mdamus/Views/ConfigView.swift | 25++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/damus/Views/ConfigView.swift b/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)