From 24a78782f763e2a261e234367ce56727345e3211 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Tue, 7 May 2024 18:58:25 +0400 Subject: [PATCH] buttons wip --- apps/ios/Shared/Views/Chat/ChatInfoView.swift | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/apps/ios/Shared/Views/Chat/ChatInfoView.swift b/apps/ios/Shared/Views/Chat/ChatInfoView.swift index 4c3f579c0d..4a0e04ec67 100644 --- a/apps/ios/Shared/Views/Chat/ChatInfoView.swift +++ b/apps/ios/Shared/Views/Chat/ChatInfoView.swift @@ -164,6 +164,17 @@ struct ChatInfoView: View { .listRowBackground(Color.clear) .listRowSeparator(.hidden) + HStack { + messageButton() + Spacer() + callButton() + Spacer() + videoButton() + } + .padding(.horizontal) + .listRowBackground(Color.clear) + .listRowSeparator(.hidden) + if let customUserProfile = customUserProfile { Section("Incognito") { HStack { @@ -388,6 +399,46 @@ struct ChatInfoView: View { } } + private func messageButton() -> some View { + Button { + dismiss() + chatModel.chatId = chat.id + } label: { + actionButton("message.fill", "message") + } + } + + private func callButton() -> some View { + Button { + + } label: { + actionButton("phone.fill", "call") + } + } + + private func videoButton() -> some View { + Button { + + } label: { + actionButton("video.fill", "video") + } + } + + private func actionButton(_ image: String, _ title: LocalizedStringKey) -> some View { + VStack(spacing: 4) { + Image(systemName: image) + .resizable() + .scaledToFit() + .frame(width: 24, height: 24) + Text(title) + .font(.caption) + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color(.secondarySystemGroupedBackground)) + .cornerRadius(12.0) + .frame(width: 90, height: 60) + } + private func verifyCodeButton(_ code: String) -> some View { NavigationLink { VerifyCodeView(