Skip to content

Commit

Permalink
Added command bar entry
Browse files Browse the repository at this point in the history
  • Loading branch information
casperstorm committed Sep 30, 2024
1 parent 8c783c1 commit 5b84d1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/screen/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ impl Dashboard {
command_bar::Buffer::ToggleFileTransfers => {
(self.toggle_file_transfers(config, main_window), None)
}
command_bar::Buffer::ToggleLogs => {
(self.toggle_logs(config, main_window), None)
},
},
command_bar::Command::Configuration(command) => match command {
command_bar::Configuration::OpenDirectory => {
Expand Down
4 changes: 3 additions & 1 deletion src/screen/dashboard/command_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ pub enum Buffer {
Popout,
Merge,
ToggleFileTransfers,
ToggleLogs,
}

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -200,7 +201,7 @@ impl Buffer {
resize_buffer: data::buffer::Resize,
main_window: window::Id,
) -> Vec<Self> {
let mut list = vec![Buffer::New, Buffer::ToggleFileTransfers];
let mut list = vec![Buffer::New, Buffer::ToggleFileTransfers, Buffer::ToggleLogs];

if let Some((window, _)) = focus {
list.push(Buffer::Close);
Expand Down Expand Up @@ -298,6 +299,7 @@ impl std::fmt::Display for Buffer {
Buffer::Popout => write!(f, "Pop out buffer"),
Buffer::Merge => write!(f, "Merge buffer"),
Buffer::ToggleFileTransfers => write!(f, "Toggle File Transfers"),
Buffer::ToggleLogs => write!(f, "Toggle Logs"),
}
}
}
Expand Down

0 comments on commit 5b84d1f

Please sign in to comment.