ios: update whats new (#7359)

* ios: update whats new

* custom view

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-08-10 13:00:38 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
parent f921bd47bb
commit ec6e975001
@@ -8,6 +8,7 @@
// Spec: spec/client/navigation.md
import SwiftUI
import StoreKit
import SimpleXChat
private struct VersionDescription {
@@ -41,6 +42,8 @@ private struct FeatureView {
let view: () -> any View
}
private let isInUS = SKStorefront().countryCode == "USA"
private let versionDescriptions: [VersionDescription] = [
VersionDescription(
version: "v4.2",
@@ -667,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)",
@@ -762,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