diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 11e85bdf7..a0e9adacb 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -161,6 +161,7 @@ 7BC707F227290ACB002817AD /* SessionCallManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC707F127290ACB002817AD /* SessionCallManager.swift */; }; 7BCD116C27016062006330F1 /* WebRTCSession+DataChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BCD116B27016062006330F1 /* WebRTCSession+DataChannel.swift */; }; 7BD477A827EC39F5004E2822 /* Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD477A727EC39F5004E2822 /* Atomic.swift */; }; + 7BD687D12A5D0D1200D8E455 /* MessageInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD687D02A5D0D1200D8E455 /* MessageInfoView.swift */; }; 7BDCFC08242186E700641C39 /* NotificationServiceExtensionContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */; }; 7BDCFC0B2421EB7600641C39 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; }; 7BFA8AE32831D0D4001876F3 /* ContextMenuVC+EmojiReactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFA8AE22831D0D4001876F3 /* ContextMenuVC+EmojiReactsView.swift */; }; @@ -1276,6 +1277,8 @@ 7BC707F127290ACB002817AD /* SessionCallManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionCallManager.swift; sourceTree = ""; }; 7BCD116B27016062006330F1 /* WebRTCSession+DataChannel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WebRTCSession+DataChannel.swift"; sourceTree = ""; }; 7BD477A727EC39F5004E2822 /* Atomic.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Atomic.swift; sourceTree = ""; }; + 7BD687D02A5D0D1200D8E455 /* MessageInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageInfoView.swift; sourceTree = ""; }; + 7BD687D22A5D283200D8E455 /* build_libSession_util.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_libSession_util.sh; sourceTree = ""; }; 7BDCFC0424206E7300641C39 /* SessionNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SessionNotificationServiceExtension.entitlements; sourceTree = ""; }; 7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationServiceExtensionContext.swift; sourceTree = ""; }; 7BFA8AE22831D0D4001876F3 /* ContextMenuVC+EmojiReactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContextMenuVC+EmojiReactsView.swift"; sourceTree = ""; }; @@ -3089,6 +3092,7 @@ 7B3A392D2977791E002FE4AC /* MediaInfoVC.swift */, 7B3A392F297A3919002FE4AC /* MediaInfoVC+MediaPreviewView.swift */, 7B2561C12978B307005C086C /* MediaInfoVC+MediaInfoView.swift */, + 7BD687D02A5D0D1200D8E455 /* MessageInfoView.swift */, ); path = "Media Viewing & Editing"; sourceTree = ""; @@ -4284,6 +4288,7 @@ FDE7214E287E50D50093DF33 /* Scripts */ = { isa = PBXGroup; children = ( + 7BD687D22A5D283200D8E455 /* build_libSession_util.sh */, FDE7214F287E50D50093DF33 /* ProtoWrappers.py */, FDE72150287E50D50093DF33 /* LintLocalizableStrings.swift */, FD5CE3442A3C5D96001A6DE3 /* DecryptExportedKey.swift */, @@ -6319,6 +6324,7 @@ FD37E9CC28A1E578003AE748 /* AppearanceViewController.swift in Sources */, B8EB20F02640F7F000773E52 /* OpenGroupInvitationView.swift in Sources */, C328254025CA55880062D0A7 /* ContextMenuVC.swift in Sources */, + 7BD687D12A5D0D1200D8E455 /* MessageInfoView.swift in Sources */, 3427C64320F500E000EEC730 /* OWSMessageTimerView.m in Sources */, B8269D2925C7A4B400488AB4 /* InputView.swift in Sources */, FD71162E28E168C700B47552 /* SettingsViewModel.swift in Sources */, diff --git a/Session/Media Viewing & Editing/MessageInfoView.swift b/Session/Media Viewing & Editing/MessageInfoView.swift new file mode 100644 index 000000000..4f5122029 --- /dev/null +++ b/Session/Media Viewing & Editing/MessageInfoView.swift @@ -0,0 +1,88 @@ +// Copyright © 2023 Rangeproof Pty Ltd. All rights reserved. + +import SwiftUI + +struct MessageInfoView: View { + var actions: [ContextMenuVC.Action] + var messageViewModel: MessageViewModel + + var body: some View { + VStack( + alignment: .center, + spacing: 10 + ) { + // Message bubble snapshot + Image("snapshot") + + // TODO: Attachment carousel view + + // Message Info + ZStack { + RoundedRectangle(cornerRadius: 8) + VStack( + alignment: .leading, + spacing: 10 + ) { + VStack( + alignment: .leading + ) { + Text("Sent:") + .bold() + Text() + } + + VStack( + alignment: .leading + ) { + Text("Received:") + .bold() + Text("") + } + + VStack( + alignment: .leading + ) { + Text("From:") + .bold() + HStack( + spacing: 5 + ) { + Image("avatar") + VStack( + alignment: .leading + ) { + Text("Name") + .bold() + Text("session id") + } + } + } + } + } + + // Actions + ZStack { + RoundedRectangle(cornerRadius: 8) + VStack { + ForEach( + 0...(actions.count - 1), + id: \.self + ) { index in + HStack { + Image(uiImage: actions[index].icon!) + Text(actions[index].title) + } + } + } + } + } + } +} + +struct MessageInfoView_Previews: PreviewProvider { + static var previews: some View { + MessageInfoView( + actions: [], + messageViewModel: nil) + } +}