diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 07bd80d090..b6c8fad9f6 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -225,7 +225,7 @@ struct ChatListView: View { } } .appSheet(isPresented: $showGetStakeSheet) { - GetStakeView(fromSettings: false) + GetStakeView(fromSettings: false, showFirstImage: true) } .onChange(of: activeUserPickerSheet) { if $0 != nil { diff --git a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift index bbdc300513..5bd57ba798 100644 --- a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift +++ b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift @@ -853,13 +853,13 @@ fileprivate struct InvestInSimpleXChat: View { .padding(.bottom, 8) .onTapGesture { showGetStakeSheet = true } #endif - Text("Learn more on Wefunder.") - .foregroundColor(theme.colors.primary) + (Text("Crowdfunding on Wefunder.") + Text(verbatim: " ") + Text("Learn more").foregroundColor(theme.colors.primary)) + .multilineTextAlignment(.leading) .onTapGesture { showGetStakeSheet = true } } .frame(maxWidth: .infinity, alignment: .leading) .sheet(isPresented: $showGetStakeSheet) { - GetStakeView(fromSettings: false) + GetStakeView(fromSettings: false, showFirstImage: false) } } } @@ -885,7 +885,7 @@ fileprivate let getStakeSlides: [(image: String, heading: String, info: String?, ), ( "crowdfunding_4", - "Revenue plan: businesses & channels pay", + "Revenue plan: businesses & big channels pay", "SimpleX Chat plans to earn from the infrastructure and services that creators, businesses and large communities need as they grow.", "Read about how we plan to make SimpleX Chat and network profitable, and about all the investment terms on Wefunder." ), @@ -899,6 +899,7 @@ struct GetStakeView: View { @Environment(\.dismiss) var dismiss: DismissAction @EnvironmentObject var chatModel: ChatModel var fromSettings: Bool + var showFirstImage: Bool var body: some View { ZoomablePageView { @@ -908,7 +909,9 @@ struct GetStakeView: View { .bold() .fixedSize(horizontal: false, vertical: true) .if(!fromSettings) { $0.padding(.top) } - slideImage(getStakeSlides[0]) + if showFirstImage { + slideImage(getStakeSlides[0]) + } (Text(verbatim: getStakeSlides[0].text) + Text(verbatim: " Learn more and invest on Wefunder.").bold().foregroundColor(.accentColor)) .multilineTextAlignment(.leading) .onTapGesture { diff --git a/apps/ios/Shared/Views/UserSettings/SettingsView.swift b/apps/ios/Shared/Views/UserSettings/SettingsView.swift index b9235cb3ca..04dc3c2812 100644 --- a/apps/ios/Shared/Views/UserSettings/SettingsView.swift +++ b/apps/ios/Shared/Views/UserSettings/SettingsView.swift @@ -426,7 +426,7 @@ struct SettingsView: View { if isInUS { Section(header: Text("Own a part of SimpleX Chat").foregroundColor(theme.colors.secondary)) { NavigationLink { - GetStakeView(fromSettings: true) + GetStakeView(fromSettings: true, showFirstImage: true) .navigationBarTitle("", displayMode: .inline) } label: { settingsRow("dollarsign.circle", color: theme.colors.secondary) { Text("Crowdfunding on Wefunder") } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt index ac247ec9d6..c740e53a17 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/GetStakeBanner.kt @@ -74,7 +74,7 @@ fun GetStakeBanner(showDismiss: Boolean, onTap: () -> Unit, onDismiss: () -> Uni fun openGetStake(modalManager: ModalManager) { appPrefs.getStakeBannerTapped.set(true) modalManager.showModalCloseable(cardScreen = true) { close -> - GetStakeView(inCenterOfWindow = modalManager === ModalManager.center, close = close) + GetStakeView(showFirstImage = true, inCenterOfWindow = modalManager === ModalManager.center, close = close) } } 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 71e53ba974..b4b9ece8f0 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 @@ -1136,7 +1136,7 @@ fun isInUs(): Boolean = @Composable private fun InvestInSimpleXChatView(modalManager: ModalManager) { if (!crowdfundingAvailable()) return - val showGetStake = { modalManager.showModalCloseable(cardScreen = true) { close -> GetStakeView(inCenterOfWindow = crowdfundingLayout.inCenterOfWindow(modalManager), close = close) } } + val showGetStake = { modalManager.showModalCloseable(cardScreen = true) { close -> GetStakeView(showFirstImage = false, inCenterOfWindow = crowdfundingLayout.inCenterOfWindow(modalManager), close = close) } } Column(modifier = Modifier.padding(bottom = 12.dp)) { Text( generalGetString(MR.strings.v7_1_invest), @@ -1163,8 +1163,13 @@ private fun InvestInSimpleXChatView(modalManager: ModalManager) { ) } Text( - generalGetString(MR.strings.v7_1_invest_learn_more), - color = MaterialTheme.colors.primary, + buildAnnotatedString { + append(generalGetString(MR.strings.v7_0_invest_descr)) + append(" ") + withStyle(SpanStyle(color = MaterialTheme.colors.primary)) { + append(generalGetString(MR.strings.learn_more)) + } + }, fontSize = 15.sp, modifier = Modifier .pointerHoverIcon(PointerIcon.Hand) @@ -1206,14 +1211,14 @@ private val getStakeSlides: List = listOf( ), CrowdfundingSlide( MR.images.crowdfunding_4, - "Revenue plan: businesses & channels pay", + "Revenue plan: businesses & big channels pay", "SimpleX Chat plans to earn from the infrastructure and services that creators, businesses and large communities need as they grow.", "Read about how we plan to make SimpleX Chat and network profitable, and about all the investment terms on Wefunder." ), ) @Composable -fun GetStakeView(inCenterOfWindow: Boolean = false, close: () -> Unit) { +fun GetStakeView(showFirstImage: Boolean, inCenterOfWindow: Boolean = false, close: () -> Unit) { val uriHandler = LocalUriHandler.current val stopped = chatModel.chatRunning.value == false @@ -1242,7 +1247,9 @@ fun GetStakeView(inCenterOfWindow: Boolean = false, close: () -> Unit) { // in the center of the window the page is wide enough for the title to fit on one line val title = "Invest in\nSimpleX Chat" AppBarTitle(if (inCenterOfWindow) title.replace("\n", " ") else title, withPadding = false) - slideImage(getStakeSlides[0]) + if (showFirstImage) { + slideImage(getStakeSlides[0]) + } Text( buildAnnotatedString { append(getStakeSlides[0].text) @@ -1253,7 +1260,7 @@ fun GetStakeView(inCenterOfWindow: Boolean = false, close: () -> Unit) { } } }, - Modifier.padding(top = 8.dp), + Modifier.padding(top = if (showFirstImage) 8.dp else 0.dp), lineHeight = 24.sp ) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/SettingsView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/SettingsView.kt index cdc41b85ad..fc9306eeb2 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/SettingsView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/SettingsView.kt @@ -143,7 +143,7 @@ fun SettingsLayout( SettingsActionItem( painterResource(MR.images.ic_redeem), stringResource(MR.strings.v7_0_crowdfunding), - { ModalManager.start.showModalCloseable(cardScreen = true) { close -> GetStakeView(close = close) } } + { ModalManager.start.showModalCloseable(cardScreen = true) { close -> GetStakeView(showFirstImage = true, close = close) } } ) } } 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 ab27657f39..50ece33a20 100644 --- a/apps/multiplatform/common/src/commonMain/moko-resources/base/strings.xml +++ b/apps/multiplatform/common/src/commonMain/moko-resources/base/strings.xml @@ -2714,6 +2714,7 @@ - opt-in to send link previews.\n- use SOCKS proxy if enabled.\n- prevent hyperlink phishing.\n- remove link tracking. Non-profit governance To make SimpleX Network last. + Crowdfunding on Wefunder. Crowdfunding on Wefunder Learn more on Wefunder Invest in SimpleX Chat! @@ -3357,7 +3358,6 @@ Invest $1000+ and get a free legend badge. Learn more on Wefunder Own a part of SimpleX Chat! 🚀 - Learn more on Wefunder. Supporter badges Send larger files\navailable for longer. Larger files available for longer. diff --git a/apps/multiplatform/spec/client/chat-list.md b/apps/multiplatform/spec/client/chat-list.md index b655397b0c..e1b847af49 100644 --- a/apps/multiplatform/spec/client/chat-list.md +++ b/apps/multiplatform/spec/client/chat-list.md @@ -356,7 +356,7 @@ The badge alert banner always offers the X; only the pitch waits to be tapped on Both are in `AppPreferences.hintPreferences`, so "Reset all hints" restores the banner. The X is never offered below the onboarding cards, so the banner cannot be dismissed before the user has a chat. -Tapping the card runs `openGetStake()`, which opens `GetStakeView` as a card modal. +Tapping the card runs `openGetStake()`, which opens `GetStakeView(showFirstImage = true)` as a card modal — `showFirstImage` decides whether the page repeats the first slide's image, which only What's New shows above its own link. ### Shared card chrome diff --git a/assets/multiplatform/resources/MR/images/crowdfunding_4@2x.jpg b/assets/multiplatform/resources/MR/images/crowdfunding_4@2x.jpg index f8260c67a4..8c91cd9a05 100644 Binary files a/assets/multiplatform/resources/MR/images/crowdfunding_4@2x.jpg and b/assets/multiplatform/resources/MR/images/crowdfunding_4@2x.jpg differ diff --git a/assets/multiplatform/resources/MR/images/crowdfunding_4@3x.jpg b/assets/multiplatform/resources/MR/images/crowdfunding_4@3x.jpg index 0b6ff3bf16..0a99e42101 100644 Binary files a/assets/multiplatform/resources/MR/images/crowdfunding_4@3x.jpg and b/assets/multiplatform/resources/MR/images/crowdfunding_4@3x.jpg differ