Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Hotline/MacApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
}
}


@main
struct Application: App {
@Environment(\.scenePhase) private var scenePhase
Expand Down Expand Up @@ -318,6 +319,14 @@ struct Application: App {
}
.keyboardShortcut(.init("K"), modifiers: .command)
}
CommandGroup(replacing: .sidebar) {
Button("Show Sidebar") {
withAnimation {
activeServerState?.columnVisibility = .all
}
}
.keyboardShortcut("S", modifiers: [.command, .option])
}
CommandGroup(before: .singleWindowList) {
Button("Toolbar") {
self.toggleBannerWindow()
Expand Down Expand Up @@ -507,4 +516,3 @@ struct Application: App {
}
}
}

1 change: 1 addition & 0 deletions Hotline/State/ServerState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class ServerState: Equatable {
var id: UUID = UUID()
var selection: ServerNavigationType
var serverName: String? = nil
var columnVisibility: NavigationSplitViewVisibility = .all
var accountsShown: Bool = false
var broadcastShown: Bool = false
var fileNavigationPath: [String]? = nil
Expand Down
2 changes: 1 addition & 1 deletion Hotline/macOS/ServerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ struct ServerView: View {
}

var serverView: some View {
NavigationSplitView {
NavigationSplitView(columnVisibility: self.$state.columnVisibility) {
self.navigationList
.navigationSplitViewColumnWidth(200)
// .navigationSplitViewColumnWidth(min: 150, ideal: 200, max: 400)
Expand Down