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:
parent
c3f8103482
commit
61ee809df5
10 changed files with 315 additions and 135 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue