Move the chain switcher into the settings drawer

This commit is contained in:
2026-10-11 20:18:05 +08:00
parent e67ed9e063
commit 2f70931cba
2 changed files with 18 additions and 6 deletions
+8 -6
View File
@@ -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 {
Text(model.wallet?.name ?? "Wallet") VStack(alignment: .leading, spacing: 2) {
.font(.system(size: 16, weight: .semibold)) Text(model.wallet?.name ?? "Wallet")
.foregroundStyle(Theme.text) .font(.system(size: 16, weight: .semibold))
.foregroundStyle(Theme.text)
Text(model.chain.title)
.font(.system(size: 11, weight: .medium))
.foregroundStyle(Theme.muted)
}
Spacer() Spacer()
} }
+10
View File
@@ -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")