Paywall feature description

This commit is contained in:
Kylmakalle 2025-03-17 21:20:30 +02:00
parent c0fd059b29
commit c58119a137
12 changed files with 118 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Backup.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Filter.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Formatting.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Icons.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Mute.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 KiB

View File

@ -101,7 +101,7 @@ struct SGPayWallFeatureDetails: View {
let dismissAction: () -> Void
var bottomOffset: CGFloat = 0.0
let contentHeight: CGFloat = 650.0
let contentHeight: CGFloat = 666.0 // heh
let features: [SGProFeature]
@State var shownFeature: SGProFeatureId?
@ -134,12 +134,14 @@ struct SGPayWallFeatureDetails: View {
SGProFeatureView(
feature: feature
)
Color.clear.frame(height: 8.0) // paginator padding
}
.tag(feature.id)
.scrollBounceBehaviorIfAvailable(.basedOnSize)
}
}
.tabViewStyle(.page)
.padding(.bottom, bottomOffset - 8.0)
}
// Spacer for purchase buttons
@ -149,9 +151,8 @@ struct SGPayWallFeatureDetails: View {
}
.zIndex(1)
.frame(maxHeight: contentHeight)
.background(Color(.systemGray6))
.background(Color(.black))
.cornerRadius(8, corners: [.topLeft, .topRight])
.padding(.bottom, bottomOffset)
.overlay(closeButtonView)
.offset(y: max(0, dragOffset))
.gesture(
@ -241,7 +242,7 @@ struct SGProFeatureView: View {
.font(.title)
.fontWeight(.bold)
.multilineTextAlignment(.center)
Text(feature.description ?? feature.subtitle)
Text(featureSubtitle)
.font(.subheadline)
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
@ -251,6 +252,10 @@ struct SGProFeatureView: View {
Spacer()
}
}
var featureSubtitle: String {
return feature.description ?? feature.subtitle
}
}
enum SGProFeatureId: Hashable {

View File

@ -195,15 +195,19 @@
"PayWall.SessionBackup.Title" = "Accounts Backup";
"PayWall.SessionBackup.Notice" = "Log-in to accounts without code, even after reinstall. Secure storage with on-device Keychain.";
"PayWall.SessionBackup.Description" = "Changing device or deleting Swiftgram is no longer an issue. Restore all Sessions that are still Active on Telegram servers.";
"PayWall.MessageFilter.Title" = "Message Filter";
"PayWall.MessageFilter.Notice" = "Reduce visibility of SPAM, promotions and annoying messages.";
"PayWall.MessageFilter.Description" = "Create a list of keywords you don't want to see often and Swiftgram will reduce distractions.";
"PayWall.Notifications.Title" = "Disable @mentions and replies";
"PayWall.Notifications.Notice" = "Hide or mute non-important notifications.";
"PayWall.Notifications.Description" = "No more Pinned Messages or @mentions when you need some piece of mind.";
"PayWall.InputToolbar.Title" = "Formatting Panel";
"PayWall.InputToolbar.Notice" = "Save time formatting messages with just a single tap.";
"PayWall.InputToolbar.Description" = "Apply and clear Formatting or insert new lines like a Pro.";
"PayWall.AppIcons.Title" = "Unique App Icons";
"PayWall.AppIcons.Notice" = "Customize Swiftgram look on your home screen.";