From e2bc132efbe9f3ad5408c7ebd037dd6b758355ed Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Sat, 8 Aug 2026 20:35:12 +0100 Subject: [PATCH] custom view --- .../Views/Onboarding/WhatsNewView.swift | 52 ++++++++++++++++--- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift index 0dc902d736..6ea24ec91c 100644 --- a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift +++ b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift @@ -670,7 +670,13 @@ private let versionDescriptions: [VersionDescription] = [ VersionDescription( version: "v7.0", post: nil, - features: [ + features: (isInUS ? [ + .view(FeatureView( + icon: nil, + title: "Invest in SimpleX Chat", + view: { InvestInSimpleXChat() } + )) + ] : []) + [ .feature(Description( icon: "at", title: "SimpleX public names (BETA)", @@ -687,13 +693,7 @@ private let versionDescriptions: [VersionDescription] = [ ("text.alignleft", "Easier to read."), ] )) - ] + (isInUS ? [ - .feature(Description( - icon: "dollarsign.circle", - title: "Invest in SimpleX Chat", - description: "[Learn more on Wefunder](https://wefunder.com/simplexchat)." - )) - ] : []) + ] ), ] @@ -771,6 +771,42 @@ fileprivate struct CreateUpdateAddressShortLink: View { } } +fileprivate struct InvestInSimpleXChat: View { + @Environment(\.colorScheme) var colorScheme + @EnvironmentObject var theme: AppTheme + + var body: some View { + HStack(alignment: .top, spacing: 8) { + VStack(alignment: .leading, spacing: 4) { + HStack(alignment: .center, spacing: 4) { + Image(systemName: "dollarsign.circle") + .symbolRenderingMode(.monochrome) + .foregroundColor(theme.colors.secondary) + .frame(minWidth: 30, alignment: .center) + Text(verbatim: "Invest in SimpleX Chat").font(.title3).bold() + } + Text(verbatim: "Equity crowdfunding launched!") + .multilineTextAlignment(.leading) + .lineLimit(2) + if let url = URL("https://wefunder.com/simplexchat") { + ExternalLink(destination: url) { + HStack { + Text(verbatim: "Learn more on Wefunder") + Image(systemName: "arrow.up.right.circle") + } + } + } + } + .frame(maxWidth: .infinity, alignment: .leading) + Image(colorScheme == .light ? "own-stake" : "own-stake-light") + .resizable() + .scaledToFill() + .frame(width: UIScreen.main.bounds.width / 5) + } + .frame(maxWidth: .infinity, alignment: .leading) + } +} + private enum WhatsNewViewSheet: Identifiable { case showConditions