mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 11:48:27 +00:00
Add non-encrypted header to conversation
This commit is contained in:
parent
5bbbbe5d75
commit
ca9f5ffe1f
9 changed files with 43 additions and 34 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M208,76H100V56a28,28,0,0,1,28-28c13.51,0,25.65,9.62,28.24,22.39a12,12,0,1,0,23.52-4.78C174.87,21.5,153.1,4,128,4A52.06,52.06,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76Zm-4,128H52V100H204Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 370 B |
|
|
@ -1 +1,11 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M208,80H96V56a32,32,0,0,1,32-32c15.37,0,29.2,11,32.16,25.59a8,8,0,0,0,15.68-3.18C171.32,24.15,151.2,8,128,8A48.05,48.05,0,0,0,80,56V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm0,128H48V96H208V208Z"></path></svg>
|
||||
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1_2)">
|
||||
<path d="M208 88H48C43.5817 88 40 91.5817 40 96V208C40 212.418 43.5817 216 48 216H208C212.418 216 216 212.418 216 208V96C216 91.5817 212.418 88 208 88Z" stroke="black" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M88 88V56C88 45.3913 83.7857 35.2172 76.2843 27.7157C68.7828 20.2143 58.6087 16 48 16C28.65 16 11.71 29.74 8 48" stroke="black" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1_2">
|
||||
<rect width="256" height="256" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 682 B |
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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é";
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue