adds nice git interface
This commit is contained in:
@@ -19,7 +19,7 @@ public struct HelderScene: Scene {
|
||||
}
|
||||
}
|
||||
|
||||
/// The menu bar. Shortcuts the key router owns (⌘F, ⌘G, ⌘L, ⌘.) are shown here too; the router
|
||||
/// The menu bar. Shortcuts the key router owns (⌘F, ⌘G, ⌘1–⌘3, ⌘L, ⌘.) are shown here too; the router
|
||||
/// consumes them first, so the menu item fires only when a field or an overlay let the key through.
|
||||
struct HelderCommands: Commands {
|
||||
@FocusedValue(\.workspace) private var workspace
|
||||
@@ -66,19 +66,22 @@ struct HelderCommands: Commands {
|
||||
.keyboardShortcut("r", modifiers: .command)
|
||||
.disabled(workspace?.root == nil)
|
||||
Divider()
|
||||
Button(workspace?.layout.isVisible(.sourceControl) == false ? "Show Source Control" : "Hide Source Control") {
|
||||
Button(workspace?.layout.isGitViewOpen == true ? "Hide Git" : "Show Git") {
|
||||
workspace?.perform(.toggleGit)
|
||||
}
|
||||
.keyboardShortcut("g", modifiers: .command)
|
||||
Button(workspace?.layout.isVisible(.explorer) == false ? "Show Explorer" : "Hide Explorer") {
|
||||
workspace?.perform(.togglePane(.explorer))
|
||||
}
|
||||
.keyboardShortcut("1", modifiers: .command)
|
||||
Button(workspace?.layout.isVisible(.editor) == false ? "Show File" : "Hide File") {
|
||||
workspace?.perform(.togglePane(.editor))
|
||||
}
|
||||
.keyboardShortcut("2", modifiers: .command)
|
||||
Button(workspace?.layout.isVisible(.terminal) == false ? "Show Claude" : "Hide Claude") {
|
||||
workspace?.perform(.togglePane(.terminal))
|
||||
}
|
||||
.keyboardShortcut("3", modifiers: .command)
|
||||
Button(workspace?.layout.fluid == false ? "Fluid Column Widths" : "Lock Column Widths") {
|
||||
workspace?.perform(.toggleAutoFit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user