MarketingContentView.swift (4443B)
1 // 2 // DamusPurpleMarketingContentView.swift 3 // damus 4 // 5 // Created by Daniel D’Aquino on 2024-02-09. 6 // 7 8 import SwiftUI 9 10 extension DamusPurpleView { 11 struct MarketingContentView: View { 12 let purple: DamusPurple 13 14 var body: some View { 15 VStack(alignment: .leading, spacing: 30) { 16 PurpleViewPrimitives.SubtitleView(text: NSLocalizedString("Help us stay independent in our mission for Freedom tech with our Purple subscription, and look cool doing it!", comment: "Damus purple subscription pitch")) 17 .multilineTextAlignment(.center) 18 19 HStack(spacing: 20) { 20 PurpleViewPrimitives.IconOnBoxView(name: "heart.fill") 21 22 VStack(alignment: .leading) { 23 PurpleViewPrimitives.TitleView(text: NSLocalizedString("Help Build The Future", comment: "Title for funding future damus development")) 24 25 PurpleViewPrimitives.SubtitleView(text: NSLocalizedString("Support Damus development to help build the future of decentralized communication on the web.", comment: "Reason for supporting damus development")) 26 } 27 } 28 29 HStack(spacing: 20) { 30 PurpleViewPrimitives.IconOnBoxView(name: "ai-3-stars.fill") 31 32 VStack(alignment: .leading) { 33 PurpleViewPrimitives.TitleView(text: NSLocalizedString("Exclusive features", comment: "Features only available on subscription service")) 34 .padding(.bottom, -3) 35 36 HStack(spacing: 3) { 37 Image("calendar") 38 .resizable() 39 .frame(width: 15, height: 15) 40 41 Text("Coming soon", comment: "Feature is still in development and will be available soon") 42 .font(.caption) 43 .bold() 44 } 45 .foregroundColor(DamusColors.pink) 46 .padding(.vertical, 3) 47 .padding(.horizontal, 8) 48 .background(DamusColors.lightBackgroundPink) 49 .cornerRadius(30.0) 50 51 PurpleViewPrimitives.SubtitleView(text: NSLocalizedString("Be the first to access upcoming premium features: Automatic translations, longer note storage, and more", comment: "Description of new features to be expected")) 52 .padding(.top, 3) 53 } 54 } 55 56 HStack(spacing: 20) { 57 PurpleViewPrimitives.IconOnBoxView(name: "badge") 58 59 VStack(alignment: .leading) { 60 PurpleViewPrimitives.TitleView(text: NSLocalizedString("Supporter Badge", comment: "Title for supporter badge")) 61 62 PurpleViewPrimitives.SubtitleView(text: NSLocalizedString("Get a special badge on your profile to show everyone your contribution to Freedom tech", comment: "Supporter badge description")) 63 } 64 } 65 66 HStack { 67 Spacer() 68 Link( 69 purple.enable_purple_iap_support ? 70 NSLocalizedString("Learn more about the features", comment: "Label for a link to the Damus website, to allow the user to learn more about the features of Purple") 71 : 72 NSLocalizedString("Coming soon! Visit our website to learn more", comment: "Label announcing Purple, and inviting the user to learn more on the website"), 73 destination: purple.environment.damus_website_url() 74 ) 75 .foregroundColor(DamusColors.pink) 76 .padding() 77 Spacer() 78 } 79 80 } 81 .padding([.trailing, .leading], 30) 82 .padding(.bottom, 20) 83 } 84 } 85 } 86 87 #Preview { 88 PurpleBackdrop { 89 DamusPurpleView.MarketingContentView(purple: test_damus_state.purple) 90 } 91 }