good spot with footer stuff
This commit is contained in:
@@ -18,7 +18,10 @@ struct ConvoFooterView: View {
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
ProfilePictureOverlap()
|
||||
ProfilePicturesOverlappedView(indvAvatarWidth: CGFloat(35))
|
||||
.padding(.leading, 20)
|
||||
.padding(.trailing, 10)
|
||||
|
||||
|
||||
// meta data of convo
|
||||
VStack (alignment: .leading) {
|
||||
@@ -43,8 +46,8 @@ struct ConvoFooterView: View {
|
||||
Label("attendees", systemImage: "person.2.circle.fill")
|
||||
.labelStyle(.iconOnly)
|
||||
.foregroundColor(NirvanaColor.teal)
|
||||
.padding()
|
||||
.font(.title2)
|
||||
.padding(.trailing, 5)
|
||||
}
|
||||
|
||||
// disconnect button
|
||||
@@ -58,8 +61,8 @@ struct ConvoFooterView: View {
|
||||
Label("Call", systemImage: "powerplug.fill")
|
||||
.labelStyle(.iconOnly)
|
||||
.foregroundColor(Color.orange)
|
||||
.padding()
|
||||
.font(.title2)
|
||||
.padding(.trailing, 5)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ struct ConvosView: View {
|
||||
|
||||
ZStack {
|
||||
Color.clear
|
||||
ProfilePictureOverlap()
|
||||
ProfilePicturesOverlappedView()
|
||||
.shadow(radius: 10)
|
||||
}
|
||||
|
||||
@@ -74,25 +74,3 @@ struct ConvosView: View {
|
||||
// ConvosView()
|
||||
// }
|
||||
//}
|
||||
|
||||
struct ProfilePictureOverlap: View {
|
||||
let numberAttendees:Int = 5
|
||||
let offset:Int = 15
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
ForEach(0..<numberAttendees, id: \.self) {attendeeIndex in
|
||||
if attendeeIndex < 3 {
|
||||
Image(Avatars.avatarSystemNames[attendeeIndex+1])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.background(NirvanaColor.dimTeal)
|
||||
.clipShape(Circle())
|
||||
.offset(x: CGFloat((-15 * attendeeIndex)) + 15)
|
||||
.frame(width: 50)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// ProfilePicturesOverlappedView.swift
|
||||
// nirvana-ios
|
||||
//
|
||||
// Created by Arjun Patel on 12/30/21.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ProfilePicturesOverlappedView: View {
|
||||
let numberAttendees:Int = 5
|
||||
let offset:Int = 15
|
||||
|
||||
var indvAvatarWidth: CGFloat = 50
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
ForEach(0..<numberAttendees, id: \.self) {attendeeIndex in
|
||||
if attendeeIndex < 3 {
|
||||
Image(Avatars.avatarSystemNames[attendeeIndex+1])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.background(NirvanaColor.dimTeal)
|
||||
.clipShape(Circle())
|
||||
.offset(x: CGFloat((-15 * attendeeIndex)) + 15)
|
||||
.frame(width: indvAvatarWidth)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ProfilePicturesOverlappedView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ProfilePicturesOverlappedView()
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ struct CircleGridView: View {
|
||||
|
||||
ZStack {
|
||||
Color.clear
|
||||
ProfilePictureOverlap()
|
||||
ProfilePicturesOverlappedView()
|
||||
.shadow(color: Color.black.opacity(0.2), radius: 10, x: 0, y: 20)
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ struct InnerCircleView: View {
|
||||
.font(.caption)
|
||||
.foregroundColor(NirvanaColor.teal)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
.padding()
|
||||
} // add friend: stale state
|
||||
@@ -90,7 +89,6 @@ struct InnerCircleView: View {
|
||||
CircleGridView(selectedFriendIndex: self.$selectedFriendIndex)
|
||||
.environmentObject(self.innerCircleVM)
|
||||
.environmentObject(self.convoViewModel)
|
||||
|
||||
}
|
||||
|
||||
// header
|
||||
@@ -104,6 +102,9 @@ struct InnerCircleView: View {
|
||||
.environmentObject(self.innerCircleVM)
|
||||
.environmentObject(self.convoViewModel)
|
||||
|
||||
ConvoFooterView()
|
||||
.environmentObject(self.convoViewModel)
|
||||
|
||||
// helper for new users
|
||||
// TODO: make it back to 1 instead of 10...testing
|
||||
if self.authSessionStore.friendsArr.count == 1 && self.selectedFriendIndex == nil { // don't show if bottom metadata showing
|
||||
|
||||
Reference in New Issue
Block a user