diff --git a/CHANGES_BWI.md b/CHANGES_BWI.md index 6ada4a405..eec6a4ed4 100644 --- a/CHANGES_BWI.md +++ b/CHANGES_BWI.md @@ -1,3 +1,10 @@ +Changes in BWI project 2.27.0 (2025-12-09) +=================================================== + +Improvements 🙌: +- MESSENGER-7554 prepare for upcoming migration announcement +- MESSENGER-7861 add reset recovery key to MAS screen + Changes in BWI project 2.26.1 (2025-10-13) =================================================== diff --git a/Riot/Assets/de.lproj/Bwi.strings b/Riot/Assets/de.lproj/Bwi.strings index 87cffc563..3eabc68ae 100644 --- a/Riot/Assets/de.lproj/Bwi.strings +++ b/Riot/Assets/de.lproj/Bwi.strings @@ -750,8 +750,11 @@ // MARK: migration to new client // Banner "bwi_mobile_dialog_m_banner_title" = "Wechsel zum BundesMessengerX"; -"bwi_mobileMdialog_m1_banner_text" = "Das ist eine neue, technisch optimierte App vom BuM. Du kannst sie jetzt schon ausprobieren, bevor bald alle wechseln müssen."; -"bwi_mobileMdialog_m1_banner_text_bold" = " Alle deine Kontakte und Nachrichten bleiben dabei erhalten."; +"bwi_mobile_dialog_m1_banner_text" = "Das ist eine neue, technisch optimierte App vom BuM. Du kannst sie jetzt schon ausprobieren, bevor bald alle wechseln müssen."; +"bwi_mobile_dialog_m1_banner_text_bold" = " Alle deine Kontakte und Nachrichten bleiben dabei erhalten."; +"bwi_mobile_dialog_m2_banner_text_prefix" = "Das ist eine neue, technisch optimierte App vom BuM. Du hast nur noch"; +"bwi_mobile_dialog_m2_banner_text_bold" = " wenige Tage"; +"bwi_mobile_dialog_m2_banner_text_suffix" = " Zeit zu wechseln. Alle deine Kontakte und Nachrichten bleiben dabei erhalten."; "bwi_mobile_dialog_m_banner_button2" = "Erfahre mehr"; "bwi_mobile_dialog_m_banner_button1" = "Später erinnern"; @@ -776,6 +779,9 @@ "bwi_a11y_close_button" = "Ansicht schließen"; -// MARK owner handling +// MARK: owner handling "room_member_power_level_owner_in" = "Inhaber von %@"; "room_member_power_level_short_owner" = "Inhaber"; + +// MARK: call event +"bwi_call_event_not_supported" = "Videomeetings werden in dieser App noch nicht unterstützt. Verwende den Webclient."; diff --git a/Riot/Assets/en.lproj/Bwi.strings b/Riot/Assets/en.lproj/Bwi.strings index 6ea85f761..6904f0486 100644 --- a/Riot/Assets/en.lproj/Bwi.strings +++ b/Riot/Assets/en.lproj/Bwi.strings @@ -663,8 +663,11 @@ // MARK: migration to new client // Banner "bwi_mobile_dialog_m_banner_title" = "Change to BundesMessengerX"; -"bwi_mobileMdialog_m1_banner_text" = "This is a new technically optimized app from BuM. You can try it out now before everyone has to switch soon."; -"bwi_mobileMdialog_m1_banner_text_bold" = " All your contacts and messages will be retained."; +"bwi_mobile_dialog_m1_banner_text" = "This is a new technically optimized app from BuM. You can try it out now before everyone has to switch soon."; +"bwi_mobile_dialog_m1_banner_text_bold" = " All your contacts and messages will be retained."; +"bwi_mobile_dialog_m2_banner_text_prefix" = "This is a new technically optimized app from BuM. You only have"; +"bwi_mobile_dialog_m2_banner_text_bold" = " a few days"; +"bwi_mobile_dialog_m2_banner_text_suffix" = " to switch. All your contacts and messages will be retained."; "bwi_mobile_dialog_m_banner_button2" = "Learn more"; "bwi_mobile_dialog_m_banner_button1" = "Remember later"; @@ -688,6 +691,10 @@ "bwi_a11y_close_button" = "Close window"; -// MARK owner handling +// MARK: owner handling "room_member_power_level_owner_in" = "Owner in %@"; "room_member_power_level_short_owner" = "Owner"; + +// MARK: call event +"bwi_call_event_not_supported" = "Video meetings are not yet supported in this app. Please use the web app."; + diff --git a/Riot/Assets/new_features.html b/Riot/Assets/new_features.html index 745905a54..3a20c99b8 100644 --- a/Riot/Assets/new_features.html +++ b/Riot/Assets/new_features.html @@ -26,6 +26,18 @@ +
+

+ Version 2.27.0 +

+ + Verbesserungen + + +

Version 2.26.0 diff --git a/Riot/Generated/BWIStrings.swift b/Riot/Generated/BWIStrings.swift index 4511fc74d..b817f63d0 100644 --- a/Riot/Generated/BWIStrings.swift +++ b/Riot/Generated/BWIStrings.swift @@ -187,6 +187,10 @@ public class BWIL10n: NSObject { public static var bwiAuthRegisterButtonTitle: String { return BWIL10n.tr("Bwi", "bwi_auth_register_button_title") } + /// Videomeetings werden in dieser App noch nicht unterstützt. Verwende den Webclient. + public static var bwiCallEventNotSupported: String { + return BWIL10n.tr("Bwi", "bwi_call_event_not_supported") + } /// Zum App Store public static var bwiDeprecatedVersionAppstoreButton: String { return BWIL10n.tr("Bwi", "bwi_deprecated_version_appstore_button") diff --git a/Riot/Modules/Common/WebViewController/WebViewViewController.h b/Riot/Modules/Common/WebViewController/WebViewViewController.h index f686abec5..4556481e4 100644 --- a/Riot/Modules/Common/WebViewController/WebViewViewController.h +++ b/Riot/Modules/Common/WebViewController/WebViewViewController.h @@ -14,5 +14,8 @@ Please see LICENSE in the repository root for full details. @interface WebViewViewController : MXKWebViewViewController +// bwi #7861 we need to enable javascript only for reauthentication +- (void) enableJavascript:(BOOL)enable; + @end diff --git a/Riot/Modules/Common/WebViewController/WebViewViewController.m b/Riot/Modules/Common/WebViewController/WebViewViewController.m index bfd29f86f..b1e1e4024 100644 --- a/Riot/Modules/Common/WebViewController/WebViewViewController.m +++ b/Riot/Modules/Common/WebViewController/WebViewViewController.m @@ -86,4 +86,12 @@ Please see LICENSE in the repository root for full details. [super setLocalHTMLFile:localHTMLFile]; } + +// bwi #7861 we need to enable javascript only for reauthentication +- (void)enableJavascript:(BOOL)enable { + if (webView) { + webView.configuration.preferences.javaScriptEnabled = enable; + } +} + @end diff --git a/Riot/Modules/Home/Fallback/AuthFallBackViewController.m b/Riot/Modules/Home/Fallback/AuthFallBackViewController.m index b8d1131d6..b60acb9ba 100644 --- a/Riot/Modules/Home/Fallback/AuthFallBackViewController.m +++ b/Riot/Modules/Home/Fallback/AuthFallBackViewController.m @@ -53,6 +53,9 @@ NSString *FallBackViewControllerJavascriptOnLogin = @"window.matrixLogin.onLogin // the user agent to bypass the limitation of Google, as a quick fix (a proper solution will be to use the SSO SDK) webView.customUserAgent = @"Mozilla/5.0"; + // bwi #7861 this webview needs javascript to function on MAS setups + [self enableJavascript:YES]; + [self clearCookies]; } diff --git a/Riot/Modules/MatrixKit/Controllers/MXKWebViewViewController.m b/Riot/Modules/MatrixKit/Controllers/MXKWebViewViewController.m index 978b40b72..b52510da4 100644 --- a/Riot/Modules/MatrixKit/Controllers/MXKWebViewViewController.m +++ b/Riot/Modules/MatrixKit/Controllers/MXKWebViewViewController.m @@ -235,14 +235,17 @@ NSString *const kMXKWebViewViewControllerJavaScriptEnableLog = canGoBack = (![webView.URL.absoluteString isEqualToString:@"about:blank"]); } - if (canGoBack) - { - self.navigationItem.rightBarButtonItem = backButton; - } - else - { - // Reset the original state - self.navigationItem.rightBarButtonItems = originalRightBarButtonItems; + // bwi #7861 don't overwrite other barbutton items here + if (self.navigationItem.rightBarButtonItem == nil) { + if (canGoBack) + { + self.navigationItem.rightBarButtonItem = backButton; + } + else + { + // Reset the original state + self.navigationItem.rightBarButtonItems = originalRightBarButtonItems; + } } } diff --git a/Riot/Modules/Reauthentication/ReauthFallBackViewController.swift b/Riot/Modules/Reauthentication/ReauthFallBackViewController.swift index 1f5435b4b..e659c1119 100644 --- a/Riot/Modules/Reauthentication/ReauthFallBackViewController.swift +++ b/Riot/Modules/Reauthentication/ReauthFallBackViewController.swift @@ -53,10 +53,16 @@ final class ReauthFallBackViewController: AuthFallBackViewController, Themable { } private func setupNavigationBar() { + // bwi #7861 change logic to both have a cancel and a close button. We don't need a back button here let doneBarButtonItem = MXKBarButtonItem(title: VectorL10n.close, style: .plain) { [weak self] in self?.didValidate?() } - self.navigationItem.leftBarButtonItem = doneBarButtonItem + self.navigationItem.rightBarButtonItem = doneBarButtonItem + + let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.cancel, style: .plain) { [weak self] in + self?.didCancel?() + } + self.navigationItem.leftBarButtonItem = cancelBarButtonItem } } diff --git a/Riot/Modules/Reauthentication/ReauthenticationCoordinator.swift b/Riot/Modules/Reauthentication/ReauthenticationCoordinator.swift index 14c7887c3..7236bf3f4 100644 --- a/Riot/Modules/Reauthentication/ReauthenticationCoordinator.swift +++ b/Riot/Modules/Reauthentication/ReauthenticationCoordinator.swift @@ -141,19 +141,24 @@ final class ReauthenticationCoordinator: ReauthenticationCoordinatorType { // NOTE: Prefer use a callback and the same mechanism as SSOAuthentificationSession instead of using custom WKWebView let reauthFallbackViewController: ReauthFallBackViewController = ReauthFallBackViewController(url: authenticationURL.absoluteString) reauthFallbackViewController.title = self.parameters.title - + + reauthFallbackViewController.enableJavascript(true) + reauthFallbackViewController.didCancel = { [weak self] in guard let self = self else { return } self.delegate?.reauthenticationCoordinatorDidCancel(self) + + // bwi #7861 cancel buttons should close the view + self.presentingViewController.dismiss(animated: true) } reauthFallbackViewController.didValidate = { [weak self] in guard let self = self else { return } - + guard let sessionId = authenticationSession.session else { self.delegate?.reauthenticationCoordinator(self, didFailWithError: ReauthenticationCoordinatorError.failToBuildPasswordParameters) return @@ -161,10 +166,13 @@ final class ReauthenticationCoordinator: ReauthenticationCoordinatorType { let authenticationParameters = self.authenticationParametersBuilder.buildOAuthParameters(with: sessionId) self.delegate?.reauthenticationCoordinatorDidComplete(self, withAuthenticationParameters: authenticationParameters) + + self.presentingViewController.dismiss(animated: true) } let navigationController = RiotNavigationController(rootViewController: reauthFallbackViewController) + // bwi #7861 close buttons should close the view self.presentingViewController.present(navigationController, animated: true) } } diff --git a/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib b/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib index 99aad1824..e662f905e 100644 --- a/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib +++ b/Riot/Modules/Room/TimelineCells/Call/CallCellContentView.xib @@ -1,9 +1,9 @@ - + - + @@ -95,6 +95,9 @@ + + + diff --git a/Riot/Modules/Room/TimelineCells/Call/MatrixRTC/RoomMatrixRTCCallCell.swift b/Riot/Modules/Room/TimelineCells/Call/MatrixRTC/RoomMatrixRTCCallCell.swift index 12921f8be..36b7c9457 100644 --- a/Riot/Modules/Room/TimelineCells/Call/MatrixRTC/RoomMatrixRTCCallCell.swift +++ b/Riot/Modules/Room/TimelineCells/Call/MatrixRTC/RoomMatrixRTCCallCell.swift @@ -23,7 +23,9 @@ class RoomMatrixRTCCallCell: RoomCallBaseCell { room.summary.setRoomAvatarImageIn(innerContentView.avatarImageView) innerContentView.avatarImageView.defaultBackgroundColor = .clear innerContentView.callerNameLabel.text = room.summary.displayName - statusText = VectorL10n.callUnsupportedMatrixRtcCall + // BWI #7954 use bwi text for call event + statusText = BWIL10n.bwiCallEventNotSupported + // BWI #7954 END bottomContentView = nil // Expands the size of the status stack. } } diff --git a/bwi/FeatureBanner/FeatureBannerView.swift b/bwi/FeatureBanner/FeatureBannerView.swift index 0a259070e..fee450f9a 100644 --- a/bwi/FeatureBanner/FeatureBannerView.swift +++ b/bwi/FeatureBanner/FeatureBannerView.swift @@ -112,7 +112,16 @@ protocol FeatureBannerDelegate { struct FeatureBannerView: View { var delegate: FeatureBannerDelegate? let darkmodeBackground = UIColor(rgb:0x2394A7) - + let warningColor = UIColor(rgb:0xD51928) + + var backgroundColor: Color { + if BWIBuildSettings.shared.BuMXMigrationInfoLevel >= 2 { + ThemeService.shared().isCurrentThemeDark() ? Color(uiColor: warningColor) : Color(ThemeService.shared().theme.warningColor) + } else { + ThemeService.shared().isCurrentThemeDark() ? Color(uiColor: darkmodeBackground) : Color(ThemeService.shared().theme.tintColor) + } + } + var body: some View { VStack(alignment: .center) { header @@ -124,7 +133,7 @@ struct FeatureBannerView: View { } } .padding(.horizontal, 12) - .background(ThemeService.shared().isCurrentThemeDark() ? Color(uiColor: darkmodeBackground) : Color(ThemeService.shared().theme.tintColor)) + .background(backgroundColor) .cornerRadius(12) .padding(16) } @@ -145,9 +154,18 @@ struct FeatureBannerView: View { var advertisementText: some View { VStack { - Text(BWIL10n.bwiMobileMdialogM1BannerText) + - Text(BWIL10n.bwiMobileMdialogM1BannerTextBold) - .bold() + VStack { + if BWIBuildSettings.shared.BuMXMigrationInfoLevel == 1 { + Text(BWIL10n.bwiMobileDialogM1BannerText) + + Text(BWIL10n.bwiMobileDialogM1BannerTextBold) + .bold() + } else { + Text(BWIL10n.bwiMobileDialogM2BannerTextPrefix) + + Text(BWIL10n.bwiMobileDialogM2BannerTextBold) + .bold() + + Text(BWIL10n.bwiMobileDialogM2BannerTextSuffix) + } + } } .font(.system(size: 15)) .multilineTextAlignment(.leading)