Nextcloud Login refactoring

This commit is contained in:
VincentMeilinger
2025-05-31 11:12:14 +02:00
parent 5acf3b9c4f
commit 48b31a7997
29 changed files with 1277 additions and 720 deletions

View File

@@ -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 {
}
}
*/