Skip to content

Commit 7f79779

Browse files
committed
ui: settings view background
1 parent d560625 commit 7f79779

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

BDKSwiftExampleWallet/Resources/Localizable.xcstrings

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@
6666
},
6767
"/" : {
6868

69+
},
70+
"%@ • %@" : {
71+
"localizations" : {
72+
"en" : {
73+
"stringUnit" : {
74+
"state" : "new",
75+
"value" : "%1$@ • %2$@"
76+
}
77+
}
78+
}
6979
},
7080
"%@ sats" : {
7181
"localizations" : {
@@ -317,6 +327,9 @@
317327
}
318328
}
319329
}
330+
},
331+
"Destructive Zone" : {
332+
320333
},
321334
"Enter address to send BTC to" : {
322335
"localizations" : {

BDKSwiftExampleWallet/View/Settings/SettingsView.swift

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,11 @@ struct SettingsView: View {
1919
NavigationStack {
2020

2121
Form {
22-
22+
2323
Section(header: Text("Network")) {
2424
if let network = viewModel.network, let url = viewModel.esploraURL {
25-
Text(network.capitalized)
25+
Text("\(network.capitalized)\(url.replacingOccurrences(of: "https://", with: "").replacingOccurrences(of: "http://", with: ""))")
2626
.foregroundColor(.primary)
27-
Text(
28-
url.replacingOccurrences(
29-
of: "https://",
30-
with: ""
31-
).replacingOccurrences(
32-
of: "http://",
33-
with: ""
34-
)
35-
)
36-
.foregroundColor(.primary)
3727
} else {
3828
HStack {
3929
Text("No Network")
@@ -65,6 +55,9 @@ struct SettingsView: View {
6555
Text(String(localized: "Show Seed"))
6656
.foregroundStyle(.red)
6757
}
58+
}
59+
60+
Section(header: Text("Destructive Zone")) {
6861
Button {
6962
showingDeleteSeedConfirmation = true
7063
} label: {
@@ -76,11 +69,16 @@ struct SettingsView: View {
7669
}
7770

7871
}
72+
.background(Color(uiColor: UIColor.systemBackground))
73+
.scrollContentBackground(.hidden)
7974
.navigationTitle("Settings")
75+
.navigationBarTitleDisplayMode(.inline)
76+
.listRowSeparator(.hidden)
8077
.onAppear {
8178
viewModel.getNetwork()
8279
viewModel.getEsploraUrl()
8380
}
81+
.padding(.top, 40.0)
8482

8583
}
8684
.sheet(isPresented: $isSeedPresented) {

0 commit comments

Comments
 (0)