|
|
|
|
@ -26,6 +26,18 @@ struct DebugSettingsView: View { |
|
|
|
|
LabeledContent("Token", value: self._token) |
|
|
|
|
LabeledContent("Server", value: self._apiURL) |
|
|
|
|
LabeledContent("Synchronized", value: self._synchronized) |
|
|
|
|
LabeledContent("Plan", value: Guard.main.currentPlan?.id ?? "None") |
|
|
|
|
|
|
|
|
|
NavigationLink { |
|
|
|
|
List { |
|
|
|
|
ForEach(DataStore.shared.purchases) { purchase in |
|
|
|
|
DebugPurchaseView(purchase: purchase) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
LabeledContent("Purchases", value: DataStore.shared.purchases.count.formatted()) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -69,6 +81,19 @@ struct DebugSettingsView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct DebugPurchaseView: View { |
|
|
|
|
|
|
|
|
|
var purchase: Purchase |
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
|
VStack { |
|
|
|
|
Text(purchase.productId) |
|
|
|
|
LabeledContent(purchase.purchaseDate.formatted(), value: purchase.expirationDate?.formatted() ?? "") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//#Preview { |
|
|
|
|
// DebugSettingsView() |
|
|
|
|
//} |
|
|
|
|
|