Features list in Threaded+

This commit is contained in:
Lumaa 2024-02-12 12:46:35 +01:00
parent 5726da53f8
commit 0c69945d50
2 changed files with 250 additions and 2 deletions

View File

@ -1,6 +1,9 @@
{
"sourceLanguage" : "en",
"strings" : {
"" : {
},
"@%@" : {
},
@ -1188,6 +1191,182 @@
}
}
},
"shop.features" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Features"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Fonctionnalités"
}
}
}
},
"shop.features.analytics" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Analytics"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Analyses"
}
}
}
},
"shop.features.analytics.description" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "See how well you're performing on Mastodon"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Regardez comment vous perforez sur Mastodon"
}
}
}
},
"shop.features.content-filter" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Stronger Content Filter"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Filtre de Contenu plus fort"
}
}
}
},
"shop.features.content-filter.description" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "An even stronger Content Filter with more parameters"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Des nouveaux paramètres pour plus de précisions"
}
}
}
},
"shop.features.download-atchmnt" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Download Attachments"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Télécharger les pièces-jointes"
}
}
}
},
"shop.features.download-atchmnt.description" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You have the ability to download attachments"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vous avez la possibilité de télécharger des pièces-jointes"
}
}
}
},
"shop.features.drafts" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "More drafts"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Plus de brouillons"
}
}
}
},
"shop.features.drafts.description" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You can have an unlimited amount of drafts"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vous pouvez avoir un nombre illimité de brouillons"
}
}
}
},
"shop.features.vip" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "VIP User"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Utilisateur VIP"
}
}
}
},
"shop.features.vip.description" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You will grant access to faster support and exclusive content"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vous aurez accès à de l'aide plus rapidement et à du contenu exclusif"
}
}
}
},
"shop.threaded-plus.dismiss" : {
"localizations" : {
"en" : {

View File

@ -18,6 +18,9 @@ struct ShopView: View {
.frame(width: 100, height: 100)
.padding(.vertical)
features
.padding(.bottom)
Spacer()
VStack(spacing: 20) {
@ -58,6 +61,7 @@ struct ShopView: View {
}
.frame(width: delegate.windowWidth)
.background(Color.appBackground)
.navigationTitle(Text(String("Threaded+")))
.sheet(isPresented: $showSub) {
ShopView.SubView()
}
@ -65,10 +69,73 @@ struct ShopView: View {
ShopView.LifetimeView()
}
}
var features: some View {
ScrollView(.vertical, showsIndicators: true) {
VStack(spacing: 25) {
Text("shop.features")
.font(.title.bold())
.scrollTransition { content, phase in
content
.opacity(phase.isIdentity ? 1 : 0)
.blur(radius: phase.isIdentity ? 0 : 5)
.offset(y: phase.isIdentity ? 0 : -15)
}
feature("shop.features.drafts", description: "shop.features.drafts.description", systemImage: "pencil.and.outline")
feature("shop.features.analytics", description: "shop.features.analytics.description", systemImage: "chart.line.uptrend.xyaxis.circle")
feature("shop.features.content-filter", description: "shop.features.content-filter.description", systemImage: "wand.and.stars")
feature("shop.features.download-atchmnt", description: "shop.features.download-atchmnt.description", systemImage: "photo.badge.arrow.down")
feature("shop.features.vip", description: "shop.features.vip.description", systemImage: "crown")
}
.frame(width: delegate.windowWidth)
}
.scrollIndicatorsFlash(onAppear: true)
.scrollClipDisabled()
}
@ViewBuilder
private func feature(_ title: LocalizedStringKey, description: LocalizedStringKey = LocalizedStringKey(stringLiteral: ""), systemImage: String) -> some View {
HStack(alignment: .center) {
Image(systemName: systemImage)
.resizable()
.scaledToFit()
.frame(width: 40, height: 40)
VStack(alignment: .leading) {
Text(title)
.bold()
.lineLimit(1)
.multilineTextAlignment(.leading)
Text(description)
.font(.callout)
.lineLimit(2)
.multilineTextAlignment(.leading)
}
Spacer()
}
.padding(.leading, 20)
.frame(width: delegate.windowWidth - 30)
.padding(.vertical)
.background(Color.gray.opacity(0.2))
.clipShape(.capsule)
.scrollTransition { content, phase in
content
.opacity(phase.isIdentity ? 1 : 0)
.scaleEffect(x: phase.isIdentity ? 1 : 0.5, y: phase.isIdentity ? 1 : 0.75, anchor: .center)
.blur(radius: phase.isIdentity ? 0 : 10)
.offset(y: phase.isIdentity ? 0 : 10)
}
}
}
extension ShopView {
private struct SubView: View {
struct SubView: View {
var body: some View {
NavigationStack {
SubscriptionStoreView(productIDs: ["fr.lumaa.Threaded.Plus.monthly", "fr.lumaa.ThreadedPlus.yearly"]) {
@ -120,7 +187,7 @@ extension ShopView {
}
}
private struct LifetimeView: View {
struct LifetimeView: View {
var body: some View {
VStack {
Text("shop.threaded-plus.lifetime.header")
@ -148,4 +215,6 @@ extension ShopView {
#Preview {
ShopView()
.environment(AppDelegate())
// .environment(\.locale, Locale(identifier: "en-us"))
}