Add SQLite to save tasks

This commit is contained in:
2023-07-19 13:01:33 +02:00
parent 0ff3803059
commit 3cdad5a4d7
10 changed files with 319 additions and 20 deletions

View File

@ -14,7 +14,7 @@ struct LutoApp: App {
var body: some Scene {
WindowGroup(id: "MainWindow") {
MainView()
MainView(viewModel: TaskViewModel())
}
}
}
@ -40,8 +40,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
self.popover = NSPopover()
self.popover.contentSize = NSSize(width: 500, height: 500)
self.popover.behavior = .transient
self.popover.contentViewController = NSHostingController(rootView: MainView()
)
self.popover.contentViewController = NSHostingController(rootView: MainView(viewModel: TaskViewModel()))
}
@objc func togglePopover() {