feat: open memo object over dasboardview instead of new window

This commit is contained in:
dscyrescotti
2024-07-07 18:35:10 +07:00
parent ab7d24fb4e
commit aafb2c74a2
10 changed files with 114 additions and 118 deletions

View File

@@ -29,19 +29,7 @@ struct MemolaApp: App {
.defaultPosition(.center)
.windowResizability(.contentSize)
.defaultSize(width: 1200, height: 800)
#endif
WindowGroup(id: "memo-view", for: URL.self) { url in
if let url = url.wrappedValue, let memo = Persistence.loadMemo(of: url) {
MemoView(memo: memo)
#if os(macOS)
.frame(minWidth: 1000, minHeight: 600)
#endif
}
}
#if os(macOS)
.defaultPosition(.center)
.windowResizability(.contentSize)
.defaultSize(width: 1200, height: 800)
.windowToolbarStyle(.unifiedCompact)
#endif
}
}