mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 18:54:11 +00:00
Add Toggle Sidebar button for macOS
This commit is contained in:
@@ -100,6 +100,16 @@ struct AppSidebarNavigation: View {
|
||||
"Current User: \(accounts.current?.description ?? "Not set")"
|
||||
)
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
ToolbarItem(placement: .navigation) {
|
||||
Button {
|
||||
NSApp.keyWindow?.firstResponder?.tryToPerform(#selector(NSSplitViewController.toggleSidebar(_:)), with: nil)
|
||||
} label: {
|
||||
Label("Toggle Sidebar", systemImage: "sidebar.left")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user