mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
finish fixing linting errors
This commit is contained in:
parent
f1625de91d
commit
864bfc7fb7
@ -197,8 +197,7 @@ impl App {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
return self
|
||||
.config
|
||||
self.config
|
||||
.keybindings
|
||||
.get(&self.mode)
|
||||
.and_then(|keymap| keymap.get(&keycode).cloned())
|
||||
@ -206,7 +205,7 @@ impl App {
|
||||
Action::AddInputChar(c)
|
||||
} else {
|
||||
Action::NoOp
|
||||
});
|
||||
})
|
||||
}
|
||||
// terminal events
|
||||
Event::Tick => Action::Tick,
|
||||
|
@ -15,6 +15,7 @@ use ratatui::{backend::CrosstermBackend, layout::Size};
|
||||
use tokio::task::JoinHandle;
|
||||
use tracing::debug;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct Tui<W>
|
||||
where
|
||||
W: Write,
|
||||
@ -24,6 +25,7 @@ where
|
||||
pub terminal: ratatui::Terminal<CrosstermBackend<W>>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl<W> Tui<W>
|
||||
where
|
||||
W: Write,
|
||||
|
@ -22,14 +22,14 @@ const DEFAULT_RESULT_NAME_FG: Color = Color::Blue;
|
||||
const DEFAULT_RESULT_PREVIEW_FG: Color = Color::Rgb(150, 150, 150);
|
||||
const DEFAULT_RESULT_LINE_NUMBER_FG: Color = Color::Yellow;
|
||||
// input
|
||||
const DEFAULT_INPUT_FG: Color = Color::Rgb(200, 200, 200);
|
||||
const DEFAULT_RESULTS_COUNT_FG: Color = Color::Rgb(150, 150, 150);
|
||||
//const DEFAULT_INPUT_FG: Color = Color::Rgb(200, 200, 200);
|
||||
//const DEFAULT_RESULTS_COUNT_FG: Color = Color::Rgb(150, 150, 150);
|
||||
// preview
|
||||
const DEFAULT_PREVIEW_TITLE_FG: Color = Color::Blue;
|
||||
const DEFAULT_SELECTED_PREVIEW_BG: Color = Color::Rgb(50, 50, 50);
|
||||
const DEFAULT_PREVIEW_CONTENT_FG: Color = Color::Rgb(150, 150, 180);
|
||||
const DEFAULT_PREVIEW_GUTTER_FG: Color = Color::Rgb(70, 70, 70);
|
||||
const DEFAULT_PREVIEW_GUTTER_SELECTED_FG: Color = Color::Rgb(255, 150, 150);
|
||||
//const DEFAULT_PREVIEW_TITLE_FG: Color = Color::Blue;
|
||||
//const DEFAULT_SELECTED_PREVIEW_BG: Color = Color::Rgb(50, 50, 50);
|
||||
//const DEFAULT_PREVIEW_CONTENT_FG: Color = Color::Rgb(150, 150, 180);
|
||||
//const DEFAULT_PREVIEW_GUTTER_FG: Color = Color::Rgb(70, 70, 70);
|
||||
//const DEFAULT_PREVIEW_GUTTER_SELECTED_FG: Color = Color::Rgb(255, 150, 150);
|
||||
|
||||
pub fn get_border_style(focused: bool) -> Style {
|
||||
if focused {
|
||||
|
@ -40,6 +40,7 @@ pub fn to_input_request(evt: &CrosstermEvent) -> Option<InputRequest> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
/// Import this trait to implement `Input::handle_event()` for crossterm.
|
||||
pub trait EventHandler {
|
||||
/// Handle crossterm event.
|
||||
|
Loading…
x
Reference in New Issue
Block a user