Show live swap status, explorer links, and full kyc.rip route details

This commit is contained in:
2026-10-26 21:31:41 +08:00
parent 2f70931cba
commit 3ff5385a9b
13 changed files with 759 additions and 150 deletions
+14 -4
View File
@@ -10,6 +10,15 @@ extension View {
}
}
/// One place for the drawers shown above every screen. Attaching them at the
/// root keeps them anchored to the window instead of to scrolled content.
@MainActor
final class DrawerCoordinator: ObservableObject {
@Published var transaction: TransactionRecord?
@Published var qr: AddressQR?
@Published var settings = false
}
private struct BottomDrawerHost<Host: View, Content: View>: View {
let host: Host
@Binding var isPresented: Bool
@@ -55,18 +64,19 @@ private struct BottomDrawerHost<Host: View, Content: View>: View {
content()
.padding(.top, 14)
.padding(.bottom, bottomInset + 16)
.padding(.bottom, 16)
}
.frame(maxWidth: .infinity, alignment: .top)
.frame(maxHeight: maxHeight)
.background(Theme.surface)
.clipShape(UnevenRoundedRectangle(topLeadingRadius: 20, topTrailingRadius: 20, style: .continuous))
.offset(y: dragOffset)
// Push the panel's background down to the physical screen edge without
// taking the host content out of its safe area.
.offset(y: dragOffset + bottomInset)
.gesture(dismissDrag)
.transition(.move(edge: .bottom))
}
}
.ignoresSafeArea()
.animation(.spring(response: 0.32, dampingFraction: 0.86), value: isPresented)
}
@@ -88,4 +98,4 @@ private struct BottomDrawerHost<Host: View, Content: View>: View {
}
}
}
}
}