Add new menus

This commit is contained in:
Arkadiusz Fal
2021-11-09 00:14:28 +01:00
parent 3b7d54aab2
commit e7e6bd109c
10 changed files with 116 additions and 17 deletions

View File

@@ -7,15 +7,19 @@ struct YatteeApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
#endif
@StateObject private var menu = MenuModel()
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(menu)
}
#if !os(tvOS)
.handlesExternalEvents(matching: Set(["*"]))
.commands {
SidebarCommands()
CommandGroup(replacing: .newItem, addition: {})
MenuCommands(model: Binding<MenuModel>(get: { menu }, set: { _ in }))
}
#endif