reverted timer in recipe detail for now
This commit is contained in:
Binary file not shown.
@@ -3171,7 +3171,7 @@
|
|||||||
"You're all set for cooking 🍓" : {
|
"You're all set for cooking 🍓" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Your grocery list is stored locally and therefore not synchronized across different devices!" : {
|
"Your grocery list is stored locally and therefore not synchronized across your devices." : {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ struct RecipeDetailView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView(showsIndicators: false) {
|
ScrollView(showsIndicators: false) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
|
ZStack {
|
||||||
if let recipeImage = recipeImage {
|
if let recipeImage = recipeImage {
|
||||||
Image(uiImage: recipeImage)
|
Image(uiImage: recipeImage)
|
||||||
.resizable()
|
.resizable()
|
||||||
@@ -32,6 +33,7 @@ struct RecipeDetailView: View {
|
|||||||
.frame(maxHeight: 300)
|
.frame(maxHeight: 300)
|
||||||
.clipped()
|
.clipped()
|
||||||
}
|
}
|
||||||
|
}.animation(.easeInOut, value: recipeImage)
|
||||||
|
|
||||||
if let recipeDetail = recipeDetail {
|
if let recipeDetail = recipeDetail {
|
||||||
LazyVStack (alignment: .leading) {
|
LazyVStack (alignment: .leading) {
|
||||||
@@ -82,7 +84,7 @@ struct RecipeDetailView: View {
|
|||||||
}.padding(.horizontal, 5)
|
}.padding(.horizontal, 5)
|
||||||
|
|
||||||
}
|
}
|
||||||
}.animation(.easeInOut, value: recipeImage)
|
}
|
||||||
}
|
}
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.navigationTitle(showTitle ? recipe.name : "")
|
.navigationTitle(showTitle ? recipe.name : "")
|
||||||
@@ -229,13 +231,13 @@ fileprivate struct RecipeDurationSection: View {
|
|||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}.padding()
|
}.padding()
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if let cookTime = recipeDetail.cookTime, let time = DurationComponents.ptToText(cookTime) {
|
if let cookTime = recipeDetail.cookTime, let time = DurationComponents.ptToText(cookTime) {
|
||||||
TimerView(timer: viewModel.getTimer(forRecipe: recipeDetail.id, duration: DurationComponents.fromPTString(cookTime)))
|
TimerView(timer: viewModel.getTimer(forRecipe: recipeDetail.id, duration: DurationComponents.fromPTString(cookTime)))
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
if let cookTime = recipeDetail.cookTime, let time = DurationComponents.ptToText(cookTime) {
|
if let cookTime = recipeDetail.cookTime, let time = DurationComponents.ptToText(cookTime) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
HStack {
|
HStack {
|
||||||
@@ -245,7 +247,7 @@ fileprivate struct RecipeDurationSection: View {
|
|||||||
Text(time)
|
Text(time)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}.padding()
|
}.padding()
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if let totalTime = recipeDetail.totalTime, let time = DurationComponents.ptToText(totalTime) {
|
if let totalTime = recipeDetail.totalTime, let time = DurationComponents.ptToText(totalTime) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ fileprivate struct EmptyGroceryListView: View {
|
|||||||
.font(.headline)
|
.font(.headline)
|
||||||
Text("Add groceries to this list by either using the button next to an ingredient list in a recipe, or by swiping right on individual ingredients of a recipe.")
|
Text("Add groceries to this list by either using the button next to an ingredient list in a recipe, or by swiping right on individual ingredients of a recipe.")
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
Text("Your grocery list is stored locally and therefore not synchronized across different devices!")
|
Text("Your grocery list is stored locally and therefore not synchronized across your devices.")
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
.navigationTitle("Grocery List")
|
.navigationTitle("Grocery List")
|
||||||
@@ -141,7 +141,7 @@ class GroceryRecipeItem: Identifiable, Codable {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GroceryList: ObservableObject {
|
@MainActor class GroceryList: ObservableObject {
|
||||||
let dataStore: DataStore = DataStore()
|
let dataStore: DataStore = DataStore()
|
||||||
@Published var groceryDict: [String: GroceryRecipe] = [:]
|
@Published var groceryDict: [String: GroceryRecipe] = [:]
|
||||||
@Published var sortBySimilarity: Bool = false
|
@Published var sortBySimilarity: Bool = false
|
||||||
|
|||||||
Reference in New Issue
Block a user