layout, add conn

This commit is contained in:
spaced4ndy 2023-11-30 22:06:27 +04:00
parent db7d8d5d0c
commit 8420a49995

View File

@ -98,6 +98,8 @@ struct NewChatView: View {
let (r, alert) = await apiAddContact(incognito: incognitoGroupDefault.get())
if let (connReq, pcc) = r {
await MainActor.run {
// TODO add connection to model if shared, or view dismissed by connected event
m.updateContactConnection(pcc)
connReqInvitation = connReq
contactConnection = pcc
m.connReqInv = connReq
@ -295,10 +297,13 @@ private struct ConnectView: View {
.aspectRatio(contentMode: .fill)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.foregroundColor(Color.clear)
Image(systemName: "camera")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 72)
VStack {
Image(systemName: "camera")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 28)
Text("Tap to scan")
}
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)