Refactor and add legal links to payment pages, change contribute view's layout
This commit is contained in:
parent
32b3ab5ee1
commit
0f2cf4af04
@ -497,7 +497,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2;
|
||||
MARKETING_VERSION = 1.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "info.maddie.Toki-Trainer.Toki-Trainer-Widgets";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
@ -524,7 +524,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2;
|
||||
MARKETING_VERSION = 1.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "info.maddie.Toki-Trainer.Toki-Trainer-Widgets";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
@ -678,7 +678,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2;
|
||||
MARKETING_VERSION = 1.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "info.maddie.Toki-Trainer";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@ -713,7 +713,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2;
|
||||
MARKETING_VERSION = 1.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "info.maddie.Toki-Trainer";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
},
|
||||
"Contribute" : {
|
||||
|
||||
"localizations" : {
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Contribuer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Correct" : {
|
||||
"localizations" : {
|
||||
@ -58,10 +65,24 @@
|
||||
}
|
||||
},
|
||||
"Donate Monthly" : {
|
||||
|
||||
"localizations" : {
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Faire un don mensuel"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Donate Once" : {
|
||||
|
||||
"localizations" : {
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Don unique"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Enter Toki Pona Word or Phrase" : {
|
||||
"localizations" : {
|
||||
@ -124,7 +145,14 @@
|
||||
}
|
||||
},
|
||||
"One-Time Donation" : {
|
||||
|
||||
"localizations" : {
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Don unique"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Parts of Speech" : {
|
||||
"localizations" : {
|
||||
@ -155,6 +183,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Privacy Policy" : {
|
||||
|
||||
},
|
||||
"Results" : {
|
||||
"localizations" : {
|
||||
@ -186,8 +217,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Thank you for donating!" : {
|
||||
"Source Code" : {
|
||||
|
||||
},
|
||||
"Terms of Use" : {
|
||||
|
||||
},
|
||||
"Thank you for donating!" : {
|
||||
"localizations" : {
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Merci pour votre don !"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Words" : {
|
||||
"localizations" : {
|
||||
@ -200,7 +244,14 @@
|
||||
}
|
||||
},
|
||||
"Write Review" : {
|
||||
|
||||
"localizations" : {
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Ecrire une critique"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"version" : "1.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Store.swift
|
||||
// TransactionObserver.swift
|
||||
// Toki Trainer
|
||||
//
|
||||
// Created by Madeline Pace on 12/18/23.
|
||||
@ -82,7 +82,6 @@ final class TransactionObserver: ObservableObject {
|
||||
}
|
||||
|
||||
func processSubscription(_ productID: String) {
|
||||
// TODO: Write function
|
||||
print("Subscription ID: \(productID)")
|
||||
switch productID {
|
||||
case K.MonthlyTransactions.TierOne:
|
||||
|
@ -36,6 +36,7 @@ Please also consider donating financially if you can. 💕
|
||||
|
||||
|
||||
|
||||
|
||||
private var recurringIAPs = ["TierThree"]
|
||||
|
||||
@EnvironmentObject var transactions: TransactionObserver
|
||||
@ -49,8 +50,16 @@ Please also consider donating financially if you can. 💕
|
||||
Text(supportString)
|
||||
.padding(16)
|
||||
Spacer()
|
||||
|
||||
// Link("Source Code", destination: URL(string: "https://git.corrupt.link/maddiefuzz/TokiTrainer")!)
|
||||
// .padding(12)
|
||||
|
||||
// .padding([.bottom], 12)
|
||||
HStack {
|
||||
ReviewButton()
|
||||
SourceCodeButton()
|
||||
}
|
||||
HStack {
|
||||
SingleDonationButton()
|
||||
RecurringDonationButton()
|
||||
}
|
||||
@ -82,6 +91,21 @@ struct ThankYouBannerView: View {
|
||||
}
|
||||
}
|
||||
|
||||
struct SourceCodeButton: View {
|
||||
var body: some View {
|
||||
Link(destination: URL(string: "https://git.corrupt.link/maddiefuzz/TokiTrainer")!) {
|
||||
VStack {
|
||||
Image(systemName: "apple.terminal")
|
||||
.font(.system(size: 24, weight: .regular))
|
||||
.padding(2)
|
||||
Text("Source Code")
|
||||
}
|
||||
}
|
||||
.frame(width: 100)
|
||||
.padding(8)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: ReviewButton
|
||||
struct ReviewButton: View {
|
||||
@Environment(\.requestReview) private var requestReview
|
||||
@ -98,7 +122,7 @@ struct ReviewButton: View {
|
||||
Text("Write Review")
|
||||
}
|
||||
})
|
||||
.frame(width: 80)
|
||||
.frame(width: 100)
|
||||
.padding(8)
|
||||
}
|
||||
|
||||
@ -144,12 +168,15 @@ struct SingleDonationButton: View {
|
||||
Text("Donate Once")
|
||||
}
|
||||
}
|
||||
.frame(width: 80)
|
||||
.frame(width: 100)
|
||||
.padding(8)
|
||||
.sheet(item: self.$IAPs) { IAPs in
|
||||
if(productsFetched) {
|
||||
VStack {
|
||||
Spacer()
|
||||
Text("One-Time Donation")
|
||||
.font(.largeTitle)
|
||||
Spacer()
|
||||
ForEach(IAPs.products) { product in
|
||||
HStack {
|
||||
VStack {
|
||||
@ -180,6 +207,12 @@ struct SingleDonationButton: View {
|
||||
}
|
||||
.padding(12)
|
||||
}
|
||||
Spacer()
|
||||
LegalLinksView()
|
||||
.padding(16)
|
||||
.padding([.bottom], 20)
|
||||
}
|
||||
//.padding([.top], 60)
|
||||
} else {
|
||||
ProgressView()
|
||||
}
|
||||
@ -244,14 +277,35 @@ struct RecurringDonationButton: View {
|
||||
Text("Donate Monthly")
|
||||
}
|
||||
}
|
||||
.frame(width: 80)
|
||||
.frame(width: 100)
|
||||
.padding(8)
|
||||
.sheet(isPresented: $toggleSheet, content: {
|
||||
VStack {
|
||||
SubscriptionStoreView(groupID: self.groupID)
|
||||
// HStack {
|
||||
// Link("Terms of Use", destination: URL(string: "https://www.apple.com/legal/internet-services/itunes/dev/stdeula/")!)
|
||||
// .padding(12)
|
||||
// Link("Privacy Policy", destination: URL(string: "https://maddie.info/null_privacy_policy")!)
|
||||
// }
|
||||
LegalLinksView()
|
||||
.padding(16)
|
||||
.padding([.bottom], 20)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
struct LegalLinksView: View {
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Link("Terms of Use", destination: URL(string: "https://www.apple.com/legal/internet-services/itunes/dev/stdeula/")!)
|
||||
.padding(12)
|
||||
Link("Privacy Policy", destination: URL(string: "https://maddie.info/null_privacy_policy")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContributeView().environmentObject(TransactionObserver())
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ struct DictionaryView: View {
|
||||
})
|
||||
.buttonStyle(.bordered)
|
||||
}
|
||||
.padding([.top, .leading, .trailing], 8)
|
||||
.padding([.top, .leading, .trailing], 16)
|
||||
if advancedSearchEnabled == true {
|
||||
VStack {
|
||||
Text("Search for:")
|
||||
@ -88,7 +88,7 @@ struct DictionaryView: View {
|
||||
.sheet(isPresented: $showGenericLegend, content: {
|
||||
PartsOfSpeechView(selectedPartOfSpeech: nil)
|
||||
})
|
||||
.onChange(of: tokiInput) { newValue in
|
||||
.onChange(of: tokiInput) {
|
||||
filterByInput()
|
||||
//tokiDictViewModel.filterDictionaryEnglishMode(newValue)
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ struct TranslatorView: View {
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.padding([.top, .leading, .trailing], 8)
|
||||
.padding([.top, .leading, .trailing], 16)
|
||||
|
||||
if tokiInput.count == 0 {
|
||||
List(tokiDictViewModel.dictionary, id: \.word) { entry in
|
||||
@ -52,8 +52,8 @@ struct TranslatorView: View {
|
||||
.sheet(item: $selectedPartOfSpeech) { selectedPOS in
|
||||
PartsOfSpeechView(selectedPartOfSpeech: selectedPOS)
|
||||
}
|
||||
.onChange(of: tokiInput) { newValue in
|
||||
tokiDictViewModel.translatePhrase(newValue)
|
||||
.onChange(of: tokiInput) {
|
||||
tokiDictViewModel.translatePhrase(tokiInput)
|
||||
}
|
||||
.onTapGesture {
|
||||
hideKeyboard()
|
||||
|
Loading…
Reference in New Issue
Block a user