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

View File

@ -195,15 +195,19 @@
"PayWall.SessionBackup.Title" = "Accounts Backup"; "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.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.Title" = "Message Filter";
"PayWall.MessageFilter.Notice" = "Reduce visibility of SPAM, promotions and annoying messages."; "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.Title" = "Disable @mentions and replies";
"PayWall.Notifications.Notice" = "Hide or mute non-important notifications."; "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.Title" = "Formatting Panel";
"PayWall.InputToolbar.Notice" = "Save time formatting messages with just a single tap."; "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.Title" = "Unique App Icons";
"PayWall.AppIcons.Notice" = "Customize Swiftgram look on your home screen."; "PayWall.AppIcons.Notice" = "Customize Swiftgram look on your home screen.";