mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-14 04:59:56 +00:00
custom view
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user