Move the chain switcher into the settings drawer
This commit is contained in:
@@ -165,15 +165,17 @@ struct HomeView: View {
|
|||||||
|
|
||||||
private var walletCard: some View {
|
private var walletCard: some View {
|
||||||
VStack(spacing: 14) {
|
VStack(spacing: 14) {
|
||||||
ChainPicker(selection: Binding(get: { model.chain },
|
|
||||||
set: { newValue in Task { await model.select(newValue) } }))
|
|
||||||
|
|
||||||
Card {
|
Card {
|
||||||
VStack(alignment: .leading, spacing: 12) {
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
HStack {
|
HStack {
|
||||||
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
Text(model.wallet?.name ?? "Wallet")
|
Text(model.wallet?.name ?? "Wallet")
|
||||||
.font(.system(size: 16, weight: .semibold))
|
.font(.system(size: 16, weight: .semibold))
|
||||||
.foregroundStyle(Theme.text)
|
.foregroundStyle(Theme.text)
|
||||||
|
Text(model.chain.title)
|
||||||
|
.font(.system(size: 11, weight: .medium))
|
||||||
|
.foregroundStyle(Theme.muted)
|
||||||
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,16 @@ struct SettingsView: View {
|
|||||||
VStack(alignment: .leading, spacing: 18) {
|
VStack(alignment: .leading, spacing: 18) {
|
||||||
ScreenHeader(title: "Settings", subtitle: "Security and device options", onBack: { dismiss() })
|
ScreenHeader(title: "Settings", subtitle: "Security and device options", onBack: { dismiss() })
|
||||||
|
|
||||||
|
Card {
|
||||||
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
|
Text("Wallet")
|
||||||
|
.font(.system(size: 13, weight: .semibold))
|
||||||
|
.foregroundStyle(Theme.muted)
|
||||||
|
ChainPicker(selection: Binding(get: { model.chain },
|
||||||
|
set: { newValue in Task { await model.select(newValue) } }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Card {
|
Card {
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
Text("Currency")
|
Text("Currency")
|
||||||
|
|||||||
Reference in New Issue
Block a user