Nextcloud Login refactoring
This commit is contained in:
@@ -9,19 +9,20 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
// MARK: - RecipeView Duration Section
|
||||
/*
|
||||
|
||||
struct RecipeDurationSection: View {
|
||||
@State var viewModel: RecipeView.ViewModel
|
||||
@Bindable var recipe: Recipe
|
||||
@Binding var editMode: Bool
|
||||
@State var presentPopover: Bool = false
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
LazyVGrid(columns: [GridItem(.adaptive(minimum: 200, maximum: .infinity), alignment: .leading)]) {
|
||||
DurationView(time: viewModel.recipe.prepTime, title: LocalizedStringKey("Preparation"))
|
||||
DurationView(time: viewModel.recipe.cookTime, title: LocalizedStringKey("Cooking"))
|
||||
DurationView(time: viewModel.recipe.totalTime, title: LocalizedStringKey("Total time"))
|
||||
DurationView(time: recipe.prepTimeDurationComponent, title: LocalizedStringKey("Preparation"))
|
||||
DurationView(time: recipe.cookTimeDurationComponent, title: LocalizedStringKey("Cooking"))
|
||||
DurationView(time: recipe.totalTimeDurationComponent, title: LocalizedStringKey("Total time"))
|
||||
}
|
||||
if viewModel.editMode {
|
||||
if editMode {
|
||||
Button {
|
||||
presentPopover.toggle()
|
||||
} label: {
|
||||
@@ -34,9 +35,9 @@ struct RecipeDurationSection: View {
|
||||
.padding()
|
||||
.popover(isPresented: $presentPopover) {
|
||||
EditableDurationView(
|
||||
prepTime: viewModel.recipe.prepTime,
|
||||
cookTime: viewModel.recipe.cookTime,
|
||||
totalTime: viewModel.recipe.totalTime
|
||||
prepTime: recipe.prepTimeDurationComponent,
|
||||
cookTime: recipe.cookTimeDurationComponent,
|
||||
totalTime: recipe.totalTimeDurationComponent
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -143,4 +144,4 @@ fileprivate struct TimePickerView: View {
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user