Merge branch 'feature/7554_migration_part_2' into 'develop'

feat: add migration part 2 banner (MESSENGER-7554)

See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!448
This commit is contained in:
Arnfried Griesert
2025-12-05 06:31:57 +00:00
3 changed files with 33 additions and 9 deletions

View File

@@ -750,8 +750,11 @@
// MARK: migration to new client // MARK: migration to new client
// Banner // Banner
"bwi_mobile_dialog_m_banner_title" = "Wechsel zum BundesMessengerX"; "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_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_mobileMdialog_m1_banner_text_bold" = " Alle deine Kontakte und Nachrichten bleiben dabei erhalten."; "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_button2" = "Erfahre mehr";
"bwi_mobile_dialog_m_banner_button1" = "Später erinnern"; "bwi_mobile_dialog_m_banner_button1" = "Später erinnern";

View File

@@ -663,8 +663,11 @@
// MARK: migration to new client // MARK: migration to new client
// Banner // Banner
"bwi_mobile_dialog_m_banner_title" = "Change to BundesMessengerX"; "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_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_mobileMdialog_m1_banner_text_bold" = " All your contacts and messages will be retained."; "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_button2" = "Learn more";
"bwi_mobile_dialog_m_banner_button1" = "Remember later"; "bwi_mobile_dialog_m_banner_button1" = "Remember later";

View File

@@ -112,7 +112,16 @@ protocol FeatureBannerDelegate {
struct FeatureBannerView: View { struct FeatureBannerView: View {
var delegate: FeatureBannerDelegate? var delegate: FeatureBannerDelegate?
let darkmodeBackground = UIColor(rgb:0x2394A7) 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 { var body: some View {
VStack(alignment: .center) { VStack(alignment: .center) {
header header
@@ -124,7 +133,7 @@ struct FeatureBannerView: View {
} }
} }
.padding(.horizontal, 12) .padding(.horizontal, 12)
.background(ThemeService.shared().isCurrentThemeDark() ? Color(uiColor: darkmodeBackground) : Color(ThemeService.shared().theme.tintColor)) .background(backgroundColor)
.cornerRadius(12) .cornerRadius(12)
.padding(16) .padding(16)
} }
@@ -145,9 +154,18 @@ struct FeatureBannerView: View {
var advertisementText: some View { var advertisementText: some View {
VStack { VStack {
Text(BWIL10n.bwiMobileMdialogM1BannerText) + VStack {
Text(BWIL10n.bwiMobileMdialogM1BannerTextBold) if BWIBuildSettings.shared.BuMXMigrationInfoLevel == 1 {
.bold() Text(BWIL10n.bwiMobileDialogM1BannerText) +
Text(BWIL10n.bwiMobileDialogM1BannerTextBold)
.bold()
} else {
Text(BWIL10n.bwiMobileDialogM2BannerTextPrefix) +
Text(BWIL10n.bwiMobileDialogM2BannerTextBold)
.bold() +
Text(BWIL10n.bwiMobileDialogM2BannerTextSuffix)
}
}
} }
.font(.system(size: 15)) .font(.system(size: 15))
.multilineTextAlignment(.leading) .multilineTextAlignment(.leading)