mirror of
https://github.com/yattee/yattee.git
synced 2025-04-28 07:50:33 +05:30
Add Toggle Sidebar button for macOS
This commit is contained in:
parent
2a75d0a1d4
commit
f0d1b74e34
@ -100,6 +100,16 @@ struct AppSidebarNavigation: View {
|
|||||||
"Current User: \(accounts.current?.description ?? "Not set")"
|
"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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user