From 670dabaf776c918ff3c5b3a580291fbeb41d640a Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Wed, 16 Nov 2022 15:46:46 +0100 Subject: [PATCH] Update popup ZRTP --- .../Base.lproj/UIConfirmationDialog.xib | 42 ++++++++++-------- Classes/LinphoneUI/StatusBarView.m | 18 +++----- Classes/LinphoneUI/UIConfirmationDialog.h | 9 +++- Classes/LinphoneUI/UIConfirmationDialog.m | 13 +++++- Resources/ar.lproj/Localizable.strings | Bin 74306 -> 74662 bytes Resources/de.lproj/Localizable.strings | Bin 81834 -> 82190 bytes Resources/en.lproj/Localizable.strings | Bin 52952 -> 53308 bytes Resources/fr.lproj/Localizable.strings | Bin 72948 -> 73646 bytes Resources/ja.lproj/Localizable.strings | Bin 72460 -> 72816 bytes Resources/nl.lproj/Localizable.strings | Bin 78674 -> 79030 bytes Resources/ru.lproj/Localizable.strings | Bin 87554 -> 87894 bytes 11 files changed, 50 insertions(+), 32 deletions(-) diff --git a/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib b/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib index 231454a0a..659a15a68 100644 --- a/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib +++ b/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib @@ -1,9 +1,9 @@ - + - + @@ -11,8 +11,10 @@ + + @@ -25,27 +27,32 @@ - - + + - - - + + + + + + + + - diff --git a/Classes/LinphoneUI/StatusBarView.m b/Classes/LinphoneUI/StatusBarView.m index 9829887ec..63d7ca774 100644 --- a/Classes/LinphoneUI/StatusBarView.m +++ b/Classes/LinphoneUI/StatusBarView.m @@ -332,14 +332,9 @@ correspondantCode = [code substringToIndex:2]; myCode = [code substringFromIndex:2]; } - NSString *message = - [NSString stringWithFormat:NSLocalizedString(@"\nConfirmation security\n\n" - @"Say: %@\n" - @"Confirm that your interlocutor\n" - @"says: %@", - nil), - myCode.uppercaseString, correspondantCode.uppercaseString]; - + NSString *message = [NSString stringWithFormat:NSLocalizedString(@"\nCommunication security:\n\nTo raise the security level, you can check the following codes with your correspondent.\n\nSay: %1$@\n\nYour correspondent must say: %2$@", nil), + myCode.uppercaseString, correspondantCode.uppercaseString]; + if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_x_Max) { UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init]; @@ -371,14 +366,14 @@ UIFont *baseFont = [UIFont systemFontOfSize:21.0]; [attrString addAttribute:NSFontAttributeName value:baseFont range:NSMakeRange(0, length)]; UIFont *boldFont = [UIFont boldSystemFontOfSize:23.0]; - [attrString addAttribute:NSFontAttributeName value:boldFont range:[message rangeOfString:@"Confirmation security"]]; + [attrString addAttribute:NSFontAttributeName value:boldFont range:[message rangeOfString:@"Communication security"]]; UIColor *color = [UIColor colorWithRed:(150 / 255.0) green:(193 / 255.0) blue:(31 / 255.0) alpha:1.0]; [attrString addAttribute:NSForegroundColorAttributeName value:color range:[message rangeOfString:myCode.uppercaseString]]; [attrString addAttribute:NSForegroundColorAttributeName value:color range:[message rangeOfString:correspondantCode.uppercaseString]]; securityDialog = [UIConfirmationDialog ShowWithAttributedMessage:attrString - cancelMessage:NSLocalizedString(@"DENY", nil) - confirmMessage:NSLocalizedString(@"ACCEPT", nil) + cancelMessage:NSLocalizedString(@"Later", nil) + confirmMessage:NSLocalizedString(@"Correct", nil) onCancelClick:^() { if (linphone_core_get_current_call(LC) == call) { linphone_call_set_authentication_token_verified(call, NO); @@ -396,6 +391,7 @@ securityDialog.securityImage.hidden = FALSE; [securityDialog setSpecialColor]; + [securityDialog setWhiteCancel]; } } } diff --git a/Classes/LinphoneUI/UIConfirmationDialog.h b/Classes/LinphoneUI/UIConfirmationDialog.h index 4d1673e66..d026bdfe5 100644 --- a/Classes/LinphoneUI/UIConfirmationDialog.h +++ b/Classes/LinphoneUI/UIConfirmationDialog.h @@ -17,11 +17,14 @@ * along with this program. If not, see . */ -#include "UIRoundBorderedButton.h" +#import + +#import "UICompositeView.h" +#import "UIRoundBorderedButton.h" typedef void (^UIConfirmationBlock)(void); -@interface UIConfirmationDialog : UIViewController { +@interface UIConfirmationDialog : UIViewController { UIConfirmationBlock onCancelCb; UIConfirmationBlock onConfirmCb; } @@ -49,7 +52,9 @@ typedef void (^UIConfirmationBlock)(void); @property (weak, nonatomic) IBOutlet UIImageView *groupCallImage; @property(weak, nonatomic) IBOutlet UIRoundBorderedButton *confirmationButton; @property (weak, nonatomic) IBOutlet UIView *authView; +@property (weak, nonatomic) IBOutlet UIImageView *backgroundColor; @property(weak, nonatomic) IBOutlet UILabel *titleLabel; +@property(weak, nonatomic) IBOutlet UIView *firstView; @property (weak, nonatomic) IBOutlet UIButton *authButton; - (void)setSpecialColor; diff --git a/Classes/LinphoneUI/UIConfirmationDialog.m b/Classes/LinphoneUI/UIConfirmationDialog.m index 43d4955d3..327bb3f04 100644 --- a/Classes/LinphoneUI/UIConfirmationDialog.m +++ b/Classes/LinphoneUI/UIConfirmationDialog.m @@ -19,7 +19,7 @@ #import "UIConfirmationDialog.h" #import "PhoneMainView.h" -#import "linphoneapp-Swift.h"" +#import "linphoneapp-Swift.h" @implementation UIConfirmationDialog + (UIConfirmationDialog *)initDialog:(NSString *)cancel @@ -33,6 +33,8 @@ dialog.view.frame = PhoneMainView.instance.mainViewController.view.frame; [controller.view addSubview:dialog.view]; [controller addChildViewController:dialog]; + dialog.backgroundColor.layer.cornerRadius = 10; + dialog.backgroundColor.layer.masksToBounds = true; dialog->onCancelCb = onCancel; dialog->onConfirmCb = onConfirm; @@ -54,6 +56,15 @@ return dialog; } +- (void)viewDidLoad { + [super viewDidLoad]; + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(onCancelClick:)]; + tapGestureRecognizer.delegate = self; + [self.firstView addGestureRecognizer:tapGestureRecognizer]; +} + + + (UIConfirmationDialog *)ShowWithMessage:(NSString *)message cancelMessage:(NSString *)cancel confirmMessage:(NSString *)confirm diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index dee4fd811aa54ed77f3327ff341b85389333f4e6..a219b09879b23e41360a594cfa8c03a62d7f1e33 100644 GIT binary patch delta 390 zcmX?fgk{-rmJRo~xpNtE8A=)Q7%~}>CwKD5id!+n0C^xB!jR9Pz)-}H2$U13dI9+=KxNCon;CmWi`3nv3*Q-J(ppiDVXUkO9TI6{x delta 268 zcmZ2>oaN9FmJRo~r#rAQicS8;El?lBkjDVR!3>EEl?+x43Jj_Y4qy>yhJ2uS8bc;S z5koFeyo4bGsHOzSsszfE0!0;oa(O_JR3JMCD3%NqEdkO+VEx5l6N}+yDgo8o0C>Ir7==L&Nyp|8Lk1OUJEpmiZ+jshqp2tW7-Kf& diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index 9b8205ba47223be37d9ed008f498ffaec58e0a10..290cfb820e6a1449d2600695faa180d9c9cac36b 100644 GIT binary patch delta 434 zcmZ4WpQW#fb;B+m`&@=xhEj$+hD?TJhD3%EAe|57DKHc>qyj}s8H#`+B@C4eRtzyf zaS#pxs!#xmCjw=PC-;_U%IX05l|a!_APq7Fq(7M<18hR}keS6d=DCC{qqL zF$1J$vZ947dn!y( zt;%2oR;>hN+XAr?*oDqO+eq^lil2b)Q~=rpa=*glnI*Ec^q({y|4laJN^bVy+wQ~1 H7-t9oVKG;S delta 260 zcmeBcVqNv0Wy3BW&OC-RhD?SchTO^We6r~=40#M79L$i&P|0A$punKY-~bkJX2=JM zL)8MsOBgbMYD$2tN}xlR3JMCD3%NqEdkO+VEx5l6N@2cPX5m;ifVHz aHk%C@RH$qFWPPsG<_-MYH}EsY83F)l|2JX) diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 7d43918de1463dd24e2c7d46a87ca2445046ebfb..bd19a5cae76d062a4475c915e18a76ae91050bad 100644 GIT binary patch delta 358 zcmcaHmwC?u<_$a?+_?<745bWt44Dkclecroid!+n0C^xB!jR9Pz)-}H2$U13dI9+=KxNCon;Cv(cn3nv3*Q-J(ppiDVXUkO9T6f-0ORTeW?0oAEa4&)R?HkDhI!H_`(VX`5~CQr6! P6Q3NyJ!`WM_lF|@saY!` diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index f1cf0bdecfb5b5e471bfc22f04d917a5ed492633..e66a6ad0be1c6b873434ffa77038e09fb64a4425 100644 GIT binary patch delta 344 zcmeyelV#n0mJL1}lRw=P(^Oz6W=Lg7W+-JSV#s7DVW?!VVu)eL1LF{edXM_bl23F1 delta 168 zcmZ3tpXJL=mJL1}lY>;mCZ})+SjRBrF@SI|Ln1>ZgB61UgDQgqSj3qjA1I#2kjYTQ zkP8$qVaNcgDFL!7fik5GMUx+LiHqg~WkLFj!TO6KCQP2l={|X%stPZP8I#|tnu{g^ k^(O(%Oa{GMHPT@c|eg=AUg*rmJAdv0n$Za{l#Dti{WM}0oB_Au@bWB ilT{B0gWQpZ%^ijeDpYpMvsH diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index c755c3f9a2de04ad3bdae576917d7b46878ffef5..b965827ef1e1b37e4a956d8f845d1f0cc4ee8ce2 100644 GIT binary patch delta 384 zcmccgjAh$PmJLEY+_?<745bWt44DkcllSt-id!+n0C^xB!jR9Pz)-}H2$Ug_D7@DL{TPP^KKHuY@6E`e`OcMcq`O;t~cu zxZ%M-?Uf8xKxGOHstkqXYkgqC(149f$9)mMOK9Edf$YdyD$YoGqC}GH8 zNCc7!43$8cQlO{;P%aNBk_u$!0L7Alq9s7O2&}&tsJe1;KBp)v*tE$PPe{V-2v%h< ZWKf}|Jq*Q@SDU9cbMSBH;AdQ?3IHkPGn@bb diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 70671d7d9ee38bfc66653b38c59474f3bda86756..09e3d692b2ac963c6a1b853d3986177f16086043 100644 GIT binary patch delta 392 zcmZo#!+LEU>john?p%gkhEj$+hD?U!$HztbK+#eloeUJu1JfA{sX$)#WO*}r;bfp}3Xoq6lqm=5D`Ci(uE@fusGbT`T*9CS zH#``qy^_HSs7!%DmBElfg~0(NH#yf#*%_i%0qn41pe_ZVamcETz^avi;joj7>6e5U#U^X<2u%LOBjm5j;J^^WkjLQ6kPjr&7%~}(7;+gD7)ls2 z7!rY`0z)NGrW7cu0F=uEilhSBIY6;wplAt@E&}T>2CA-PD4xt{Av*bu8P8-p3%<#Z z4oE12%m!ga7AqD57BdzL7Av4hstkq? oo*|1Viz5)5u-Jn1vVhET1e;|JRAoJRzeQ>@2mf{senvkJ0PwaiJpcdz