update
add missing strings add height back to purchase view button on year and month
This commit is contained in:
@@ -49,7 +49,7 @@ enum PersonalityPack: Int, CaseIterable {
|
||||
}
|
||||
|
||||
final class DefaultTitles: PersonalityPackable {
|
||||
static var title = "Nice"
|
||||
static var title = String(localized: "nice")
|
||||
|
||||
static var notificationTitles: [String] {
|
||||
[
|
||||
@@ -79,7 +79,7 @@ final class DefaultTitles: PersonalityPackable {
|
||||
}
|
||||
|
||||
final class RudeTitles: PersonalityPackable {
|
||||
static var title = "Rude"
|
||||
static var title = String(localized: "rude")
|
||||
|
||||
static var notificationTitles: [String] {
|
||||
[
|
||||
|
||||
@@ -45,7 +45,7 @@ struct CustomWigetView: View {
|
||||
.padding()
|
||||
.cornerRadius(10)
|
||||
|
||||
Text("[How to add widget](https://support.apple.com/guide/iphone/add-widgets-iphb8f1bf206/ios)")
|
||||
Text("[\(String(localized: "how_to_add_widget"))](https://support.apple.com/guide/iphone/add-widgets-iphb8f1bf206/ios)")
|
||||
.accentColor(textColor)
|
||||
.padding(.bottom)
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ struct MonthView: View {
|
||||
if iapManager.showIAP {
|
||||
VStack {
|
||||
Spacer()
|
||||
PurchaseButtonView(iapManager: iapManager)
|
||||
PurchaseButtonView(height: 250, iapManager: iapManager)
|
||||
}
|
||||
} else if iapManager.showIAPWarning {
|
||||
VStack {
|
||||
|
||||
@@ -17,8 +17,13 @@ struct PurchaseButtonView: View {
|
||||
|
||||
private let showCountdownTimer: Bool
|
||||
private let showManageSubClosure: (() -> Void)?
|
||||
|
||||
public init(iapManager: IAPManager, showManageSubClosure: (() -> Void)? = nil, showCountdownTimer: Bool = false) {
|
||||
private let height: CGFloat?
|
||||
|
||||
public init(height: CGFloat? = nil,
|
||||
iapManager: IAPManager,
|
||||
showManageSubClosure: (() -> Void)? = nil,
|
||||
showCountdownTimer: Bool = false) {
|
||||
self.height = height
|
||||
self.showManageSubClosure = showManageSubClosure
|
||||
self.iapManager = iapManager
|
||||
self.showCountdownTimer = showCountdownTimer
|
||||
@@ -31,8 +36,14 @@ struct PurchaseButtonView: View {
|
||||
switch iapManager.showIAPWarning {
|
||||
case true:
|
||||
VStack {
|
||||
buyOptionsView
|
||||
.background(theme.currentTheme.secondaryBGColor)
|
||||
if let height = self.height {
|
||||
buyOptionsView
|
||||
.background(theme.currentTheme.secondaryBGColor)
|
||||
.frame(height: height)
|
||||
} else {
|
||||
buyOptionsView
|
||||
.background(theme.currentTheme.secondaryBGColor)
|
||||
}
|
||||
}
|
||||
case false:
|
||||
subscribedView
|
||||
@@ -122,12 +133,13 @@ struct PurchaseButtonView: View {
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
Text(String(localized: "purchase_view_current_why_subscribe"))
|
||||
.font(.body)
|
||||
.bold()
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
Text(String(localized: "purchase_view_current_why_subscribe"))
|
||||
.font(.body)
|
||||
.bold()
|
||||
.foregroundColor(textColor)
|
||||
|
||||
HStack {
|
||||
ForEach(iapManager.sortedSubscriptionKeysByPriceOptions) { product in
|
||||
Button(action: {
|
||||
|
||||
@@ -67,7 +67,7 @@ struct YearView: View {
|
||||
if iapManager.showIAP {
|
||||
VStack {
|
||||
Spacer()
|
||||
PurchaseButtonView(iapManager: iapManager)
|
||||
PurchaseButtonView(height: 250, iapManager: iapManager)
|
||||
}
|
||||
} else if iapManager.showIAPWarning {
|
||||
VStack {
|
||||
|
||||
@@ -138,4 +138,9 @@
|
||||
"share_view_month_moods_total_template_title" = "Total Entries for %@ - %d";
|
||||
"share_view_current_streak_template_title" = "Last 10 Days";
|
||||
"share_view_longest_streak_template_title" = "Longest consecutive days I was %@";
|
||||
|
||||
"how_to_add_widget" = "How to Add Widget";
|
||||
"nice" = "Nice";
|
||||
"rude" = "Rude";
|
||||
|
||||
/* end not used */
|
||||
|
||||
Reference in New Issue
Block a user