Major refactor of data model

Moved all password data except ID and secret value to SwiftData table as preparation for further data collection
This commit is contained in:
Markus Thielker 2025-01-17 21:49:31 +01:00
parent c3f8103482
commit 61ee809df5
No known key found for this signature in database
10 changed files with 315 additions and 135 deletions

View file

@ -31,7 +31,7 @@ struct AddPasswordView: View {
.font(.footnote)
HStack {
Button("Save") {
viewModel.savePassword(name: name, value: value)
viewModel.createPassword(name: name, value: value)
name = ""
value = ""
dismiss()
@ -47,5 +47,9 @@ struct AddPasswordView: View {
}
#Preview {
AddPasswordView(viewModel: .init())
@Previewable
@Environment(\.modelContext) var context
AddPasswordView(viewModel: .init(context: context))
}