diff --git a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift index 79023a5821..01847d7121 100644 --- a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift +++ b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift @@ -698,20 +698,36 @@ private let versionDescriptions: [VersionDescription] = [ )) ] ), - // TODO [badges] restore when badges ship, with final copy and the Read more link. - /* VersionDescription( - version: "v7.1", + version: "v7.1-beta.8", post: nil, features: [ .view(FeatureView( icon: nil, - title: "Supporter badge", + title: "Supporter badges", view: { SupporterBadgeWhatsNew() } - )) + )), + .feature(Description( + icon: nil, + title: "Safer channels", + description: nil, + subfeatures: [ + ("flag", "Promote contributors to moderators."), + ("checkmark.seal", "Opt in to sign all channel messages."), + ] + )), + .feature(Description( + icon: "terminal", + title: "Flat (\"terminal\") chat layout", + description: "And full markdown support." + )), + .feature(Description( + icon: "phone", + title: "Better calls", + description: "Reconnect after dropped connection." + )), ] ), - */ ] private let lastVersion = versionDescriptions.last!.version @@ -731,19 +747,17 @@ fileprivate struct SupporterBadgeWhatsNew: View { @EnvironmentObject var theme: AppTheme var body: some View { - HStack(alignment: .top, spacing: 12) { - VStack(alignment: .leading, spacing: 6) { - Text("Supporter badge ❤️") - .font(.title3) - .bold() - Text("Help keep the network running — send files up to 2 GB.") - .multilineTextAlignment(.leading) - .lineLimit(10) - } - .frame(maxWidth: .infinity, alignment: .leading) - - heroThumbnail() + VStack(alignment: .leading, spacing: 6) { + Text("Supporter badges 🚀") + .font(.title3) + .bold() + Text("Send larger files\navailable for longer.") + .multilineTextAlignment(.leading) + .lineLimit(10) } + .padding(.trailing, 96) + .frame(maxWidth: .infinity, alignment: .leading) + .overlay(alignment: .topTrailing) { heroThumbnail() } } @ViewBuilder @@ -752,7 +766,8 @@ fileprivate struct SupporterBadgeWhatsNew: View { Image(colorScheme == .light ? "phone-supporter" : "phone-supporter-light") .resizable() .scaledToFit() - .frame(width: 110, height: 110) + .frame(width: 115, height: 144) + .offset(x: 23, y: -24) #else Image("badge-supporter") .resizable() diff --git a/apps/ios/SimpleX Snapshots/References/NewFeaturesView-dark-large.png b/apps/ios/SimpleX Snapshots/References/NewFeaturesView-dark-large.png index 9abc39e0aa..85ea1b2287 100644 Binary files a/apps/ios/SimpleX Snapshots/References/NewFeaturesView-dark-large.png and b/apps/ios/SimpleX Snapshots/References/NewFeaturesView-dark-large.png differ diff --git a/apps/ios/SimpleX Snapshots/References/NewFeaturesView-light-large.png b/apps/ios/SimpleX Snapshots/References/NewFeaturesView-light-large.png index 29b17d5779..d8064f50b1 100644 Binary files a/apps/ios/SimpleX Snapshots/References/NewFeaturesView-light-large.png and b/apps/ios/SimpleX Snapshots/References/NewFeaturesView-light-large.png differ diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt index 81ea810acb..6c649f1a5b 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt @@ -25,6 +25,7 @@ import androidx.compose.ui.input.pointer.PointerIcon import androidx.compose.ui.input.pointer.pointerHoverIcon import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.layout.layout import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.platform.LocalUriHandler import dev.icerock.moko.resources.compose.painterResource @@ -969,34 +970,50 @@ private val versionDescriptions: List = listOf( ), ) ), - // TODO [badges] restore when badges ship, with final copy and the Read more link. - /* VersionDescription( - version = "v7.1", + version = "v7.1-beta.8", post = null, features = listOf( VersionFeature.FeatureView( icon = null, titleId = MR.strings.v7_1_supporter_badge_title, view = { SupporterBadgeWhatsNew() } - ) + ), + VersionFeature.FeatureDescription( + icon = null, + titleId = MR.strings.v7_1_channels, + descrId = null, + subfeatures = listOf( + MR.images.ic_flag to MR.strings.v7_1_channels_moderators, + MR.images.ic_verified to MR.strings.v7_1_channels_signed_messages, + ) + ), + VersionFeature.FeatureDescription( + icon = MR.images.ic_outline_terminal, + titleId = MR.strings.v7_1_terminal_layout, + descrId = MR.strings.v7_1_terminal_layout_descr + ), + VersionFeature.FeatureDescription( + icon = MR.images.ic_call, + titleId = MR.strings.v6_1_better_calls, + descrId = MR.strings.v7_1_better_calls_descr + ), ) ), - */ ) @Composable private fun SupporterBadgeWhatsNew() { - Row(horizontalArrangement = Arrangement.spacedBy(12.dp), verticalAlignment = Alignment.Top) { - Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(6.dp)) { + Box(Modifier.padding(bottom = 12.dp).fillMaxWidth()) { + Column(Modifier.padding(end = 96.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) { Text( stringResource(MR.strings.v7_1_supporter_badge_title), - style = MaterialTheme.typography.h3, - fontWeight = FontWeight.Bold + style = MaterialTheme.typography.h4, + fontWeight = FontWeight.Medium ) Text( stringResource(MR.strings.v7_1_supporter_badge_body), - style = MaterialTheme.typography.body1, + fontSize = 15.sp, maxLines = 10 ) } @@ -1006,19 +1023,24 @@ private fun SupporterBadgeWhatsNew() { painterResource(if (isDark) MR.images.phone_supporter_light else MR.images.phone_supporter), contentDescription = null, contentScale = ContentScale.Fit, - modifier = Modifier.size(110.dp) + modifier = Modifier.align(Alignment.TopEnd).spill(x = 23.dp, y = (-24).dp).size(width = 115.dp, height = 144.dp) ) } else { Image( painterResource(MR.images.badge_supporter), contentDescription = null, contentScale = ContentScale.Fit, - modifier = Modifier.size(72.dp) + modifier = Modifier.align(Alignment.TopEnd).size(72.dp) ) } } } +private fun Modifier.spill(x: Dp, y: Dp): Modifier = layout { measurable, constraints -> + val placeable = measurable.measure(constraints) + layout(0, 0) { placeable.place(x.roundToPx() - placeable.width, y.roundToPx()) } +} + private val lastVersion = versionDescriptions.last().version fun setLastVersionDefault(m: ChatModel) { diff --git a/apps/multiplatform/common/src/commonMain/moko-resources/base/strings.xml b/apps/multiplatform/common/src/commonMain/moko-resources/base/strings.xml index e1023b9887..adce0f2067 100644 --- a/apps/multiplatform/common/src/commonMain/moko-resources/base/strings.xml +++ b/apps/multiplatform/common/src/commonMain/moko-resources/base/strings.xml @@ -3348,6 +3348,12 @@ Renews on %1$s for %2$s. Renews on %1$s. Supporter perks - Supporter badge ❤️ - Help keep the network running — send files up to 2 GB. + Supporter badges 🚀 + Send larger files\navailable for longer. + Safer channels + Promote contributors to moderators. + Opt in to sign all channel messages. + Flat ("terminal") chat layout + And full markdown support. + Reconnect after dropped connection. \ No newline at end of file diff --git a/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-dark-font-100.png b/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-dark-font-100.png index 4b9103eab6..713928362c 100644 Binary files a/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-dark-font-100.png and b/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-dark-font-100.png differ diff --git a/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-light-font-100.png b/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-light-font-100.png index 3c4b6cb69b..7423c08ad7 100644 Binary files a/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-light-font-100.png and b/apps/multiplatform/common/src/desktopTest/snapshots/WhatsNewView.PreviewWhatsNewView-light-font-100.png differ