diff --git a/Linphone/Assets.xcassets/lock-simple-open-bold.imageset/Contents.json b/Linphone/Assets.xcassets/lock-simple-open-bold.imageset/Contents.json deleted file mode 100644 index 4cb1bbebd..000000000 --- a/Linphone/Assets.xcassets/lock-simple-open-bold.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "lock-simple-open-bold.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Linphone/Assets.xcassets/lock-simple-open-bold.imageset/lock-simple-open-bold.svg b/Linphone/Assets.xcassets/lock-simple-open-bold.imageset/lock-simple-open-bold.svg deleted file mode 100644 index 60cbc520e..000000000 --- a/Linphone/Assets.xcassets/lock-simple-open-bold.imageset/lock-simple-open-bold.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Linphone/Assets.xcassets/lock-simple-open.imageset/lock-simple-open.svg b/Linphone/Assets.xcassets/lock-simple-open.imageset/lock-simple-open.svg index 203a421a1..b50838162 100644 --- a/Linphone/Assets.xcassets/lock-simple-open.imageset/lock-simple-open.svg +++ b/Linphone/Assets.xcassets/lock-simple-open.imageset/lock-simple-open.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + + + + + + diff --git a/Linphone/GeneratedGit.swift b/Linphone/GeneratedGit.swift index 621628206..0fb82505a 100644 --- a/Linphone/GeneratedGit.swift +++ b/Linphone/GeneratedGit.swift @@ -2,6 +2,6 @@ import Foundation public enum AppGitInfo { public static let branch = "master" - public static let commit = "f08bb865a" + public static let commit = "5bbbbe5d7" public static let tag = "6.1.0-alpha" } diff --git a/Linphone/Localizable/en.lproj/Localizable.strings b/Linphone/Localizable/en.lproj/Localizable.strings index f4b9030b4..b20503f5a 100644 --- a/Linphone/Localizable/en.lproj/Localizable.strings +++ b/Linphone/Localizable/en.lproj/Localizable.strings @@ -291,6 +291,8 @@ "conversation_pick_file_from_gallery_label" = "Open gallery"; "conversation_pick_any_file_label" = "Pick file"; "conversation_file_cant_be_opened_error_toast" = "File can't be opened!"; +"conversation_warning_disabled_because_not_secured_title" = "This conversation is not encrypted!"; +"conversation_warning_disabled_because_not_secured_subtitle" = "Messages aren't end-to-end encrypted, make sure you don't share sensitive information!"; "debug_logs_copied_to_clipboard_toast" = "Debug logs copied to clipboard"; "Default" = "Default"; "default_account_disabled" = "Selected account is currently disabled"; diff --git a/Linphone/Localizable/fr.lproj/Localizable.strings b/Linphone/Localizable/fr.lproj/Localizable.strings index b5072c4a5..55188cfe8 100644 --- a/Linphone/Localizable/fr.lproj/Localizable.strings +++ b/Linphone/Localizable/fr.lproj/Localizable.strings @@ -291,6 +291,8 @@ "conversation_pick_file_from_gallery_label" = "Ouvrir la galerie"; "conversation_pick_any_file_label" = "Choisir un fichier"; "conversation_file_cant_be_opened_error_toast" = "Impossible d'ouvrir le fichier!"; +"conversation_warning_disabled_because_not_secured_title" = "Cette conversation n'est pas chiffrée !"; +"conversation_warning_disabled_because_not_secured_subtitle" = "Les messages ne sont pas chiffrés de bout en bout, assurez-vous de ne pas partager d'informations sensibles !"; "debug_logs_copied_to_clipboard_toast" = "Les journaux ont été ajoutés au presse-papier"; "Default" = "Default"; "default_account_disabled" = "Le compte selectionné est désactivé"; diff --git a/Linphone/UI/Main/Conversations/Fragments/ConversationFragment.swift b/Linphone/UI/Main/Conversations/Fragments/ConversationFragment.swift index 8d6995842..f93219291 100644 --- a/Linphone/UI/Main/Conversations/Fragments/ConversationFragment.swift +++ b/Linphone/UI/Main/Conversations/Fragments/ConversationFragment.swift @@ -329,7 +329,7 @@ struct ConversationFragment: View { .padding(.top, 4) .lineLimit(1) - if isMuted || conversationViewModel.ephemeralTime != NSLocalizedString("conversation_ephemeral_messages_duration_disabled", comment: "") { + if isMuted || conversationViewModel.ephemeralTime != NSLocalizedString("conversation_ephemeral_messages_duration_disabled", comment: "") || ((SharedMainViewModel.shared.displayedConversation?.encryptionEnabled ?? cachedConversation!.encryptionEnabled) == false) { HStack { if isMuted { Image("bell-slash") @@ -353,6 +353,22 @@ struct ConversationFragment: View { .lineLimit(1) } + if (SharedMainViewModel.shared.displayedConversation?.encryptionEnabled ?? cachedConversation!.encryptionEnabled) == false { + HStack { + Image("lock-simple-open") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.orangeWarning600) + .frame(width: 16, height: 16, alignment: .trailing) + + Text("conversation_warning_disabled_because_not_secured_title") + .foregroundStyle(Color.orangeWarning600) + .default_text_style(styleSize: 12) + .frame(maxWidth: .infinity, alignment: .leading) + .lineLimit(1) + } + } + Spacer() } } diff --git a/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift b/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift index d39a0835d..cd98e28d5 100644 --- a/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift +++ b/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift @@ -173,11 +173,11 @@ struct ConversationRow: View { } if !conversation.encryptionEnabled { - Image("lock-simple-open-bold") + Image("lock-simple-open") .renderingMode(.template) .resizable() .foregroundStyle(Color.orangeWarning600) - .frame(width: 18, height: 18, alignment: .trailing) + .frame(width: 16, height: 16, alignment: .trailing) } if conversation.isEphemeral { diff --git a/Linphone/UI/Main/Conversations/Fragments/UIList.swift b/Linphone/UI/Main/Conversations/Fragments/UIList.swift index 2b116e379..9dcd4bfad 100644 --- a/Linphone/UI/Main/Conversations/Fragments/UIList.swift +++ b/Linphone/UI/Main/Conversations/Fragments/UIList.swift @@ -135,7 +135,7 @@ struct UIList: UIViewRepresentable { tableView.backgroundColor = UIColor(.white) tableView.scrollsToTop = true - if SharedMainViewModel.shared.displayedConversation != nil && SharedMainViewModel.shared.displayedConversation!.encryptionEnabled { + if SharedMainViewModel.shared.displayedConversation != nil { let footerView = Self.makeFooterView() footerView.frame = CGRect(x: 0, y: 0, width: tableView.bounds.width, height: 80) footerView.transform = CGAffineTransformMakeScale(1, -1) @@ -180,25 +180,26 @@ struct UIList: UIViewRepresentable { } static func makeFooterView() -> UIView { + let encryptionEnabled = SharedMainViewModel.shared.displayedConversation!.encryptionEnabled let host = UIHostingController( rootView: VStack { HStack { - Image("lock-simple-bold") + Image(encryptionEnabled ? "lock-simple-bold" : "lock-simple-open") .renderingMode(.template) .resizable() - .foregroundStyle(Color.blueInfo500) + .foregroundStyle(encryptionEnabled ? Color.blueInfo500 : Color.orangeWarning600) .frame(width: 25, height: 25) .padding(10) VStack(spacing: 5) { - Text("conversation_end_to_end_encrypted_event_title") - .foregroundStyle(Color.blueInfo500) + Text(encryptionEnabled ? "conversation_end_to_end_encrypted_event_title" : "conversation_warning_disabled_because_not_secured_title") + .foregroundStyle(encryptionEnabled ? Color.blueInfo500 : Color.orangeWarning600) .default_text_style_700(styleSize: 14) .frame(maxWidth: .infinity, alignment: .leading) .multilineTextAlignment(.leading) - Text("conversation_end_to_end_encrypted_event_subtitle") + Text(encryptionEnabled ? "conversation_end_to_end_encrypted_event_subtitle" : "conversation_warning_disabled_because_not_secured_subtitle") .foregroundStyle(Color.gray400) .default_text_style(styleSize: 12) .frame(maxWidth: .infinity, alignment: .leading) @@ -210,7 +211,7 @@ struct UIList: UIViewRepresentable { .overlay( RoundedRectangle(cornerRadius: 10) .inset(by: 0.5) - .stroke(Color.blueInfo500, lineWidth: 0.5) + .stroke(encryptionEnabled ? Color.blueInfo500 : Color.orangeWarning600, lineWidth: 0.5) ) .padding(.horizontal, 10) }