mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 11:19:30 +00:00
Implement MeetingsFragment and MeetingsView
This commit is contained in:
parent
08f164fc88
commit
269eeba480
2 changed files with 67 additions and 8 deletions
|
|
@ -8,11 +8,41 @@
|
|||
import SwiftUI
|
||||
|
||||
struct MeetingsFragment: View {
|
||||
var body: some View {
|
||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
||||
}
|
||||
|
||||
@ObservedObject var scheduleMeetingViewModel: ScheduleMeetingViewModel
|
||||
|
||||
private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom }
|
||||
|
||||
@State var showingSheet: Bool = false
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
Text("Hello meetings list")
|
||||
Spacer()
|
||||
/*
|
||||
if #available(iOS 16.0, *), idiom != .pad {
|
||||
MeetingsListFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, showingSheet: $showingSheet)
|
||||
.sheet(isPresented: $showingSheet) {
|
||||
ConversationsListBottomSheet(
|
||||
conversationsListViewModel: conversationsListViewModel,
|
||||
showingSheet: $showingSheet
|
||||
)
|
||||
.presentationDetents([.fraction(0.4)])
|
||||
}
|
||||
} else {
|
||||
ConversationsListFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, showingSheet: $showingSheet)
|
||||
.halfSheet(showSheet: $showingSheet) {
|
||||
ConversationsListBottomSheet(
|
||||
conversationsListViewModel: conversationsListViewModel,
|
||||
showingSheet: $showingSheet
|
||||
)
|
||||
} onDismiss: {}
|
||||
} */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
MeetingsFragment()
|
||||
MeetingsFragment(scheduleMeetingViewModel: ScheduleMeetingViewModel())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,40 @@
|
|||
import SwiftUI
|
||||
|
||||
struct MeetingsView: View {
|
||||
var body: some View {
|
||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
||||
}
|
||||
|
||||
@ObservedObject var scheduleMeetingViewModel: ScheduleMeetingViewModel
|
||||
|
||||
@Binding var isShowScheduleMeetingFragment: Bool
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
ZStack(alignment: .bottomTrailing) {
|
||||
MeetingsFragment(scheduleMeetingViewModel: scheduleMeetingViewModel)
|
||||
|
||||
Button {
|
||||
withAnimation {
|
||||
isShowScheduleMeetingFragment.toggle()
|
||||
}
|
||||
} label: {
|
||||
Image("plus-circle")
|
||||
.renderingMode(.template)
|
||||
.foregroundStyle(.white)
|
||||
.padding()
|
||||
.background(Color.orangeMain500)
|
||||
.clipShape(Circle())
|
||||
.shadow(color: .black.opacity(0.2), radius: 4)
|
||||
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
MeetingsView()
|
||||
MeetingsView(
|
||||
scheduleMeetingViewModel: ScheduleMeetingViewModel(),
|
||||
isShowScheduleMeetingFragment: .constant(false)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue