Skip to content

Commit

Permalink
add filebrowser modal
Browse files Browse the repository at this point in the history
  • Loading branch information
aprxi committed Aug 23, 2024
1 parent e79482b commit 20b0e8d
Show file tree
Hide file tree
Showing 16 changed files with 911 additions and 68 deletions.
4 changes: 4 additions & 0 deletions lumni/src/apps/api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub enum ApplicationError {
InvalidUserConfiguration(String),
Unexpected(String),
Runtime(String),
InternalError(String),
ChannelError(String),
InvalidCredentials(String),
InvalidInput(String),
Expand Down Expand Up @@ -112,6 +113,9 @@ impl fmt::Display for ApplicationError {
}
ApplicationError::Unexpected(s) => write!(f, "Unexpected: {}", s),
ApplicationError::Runtime(s) => write!(f, "Runtime: {}", s),
ApplicationError::InternalError(s) => {
write!(f, "InternalError: {}", s)
}
ApplicationError::ChannelError(s) => {
write!(f, "ChannelError: {}", s)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ macro_rules! define_commands {
// <leader> + [] -> load a modal window
// NOTE: cant use <leader> + something that includes "i", as this
// is reserved to always trigger insert mode
define_commands!(PE, PC);
define_commands!(PE, PC, PF);

pub fn process_leader_key(key_track: &mut KeyTrack) -> Option<WindowEvent> {
let leader_key_str = key_track.previous_key_str();
Expand All @@ -58,6 +58,9 @@ pub fn process_leader_key(key_track: &mut KeyTrack) -> Option<WindowEvent> {
"pc" => Some(WindowEvent::Modal(ModalAction::Open(
ModalWindowType::ConversationList,
))),
"pf" => Some(WindowEvent::Modal(ModalAction::Open(
ModalWindowType::FileBrowser,
))),
_ => None,
};
key_track.set_leader_key(false);
Expand Down
Loading

0 comments on commit 20b0e8d

Please sign in to comment.