feat: export logs feature, closes #1

Save logs to a file.
 `--logs-dir` cli arg to change from the default location.

Refactor of input_handler
This commit is contained in:
Jack Wills
2023-11-19 16:03:18 +00:00
parent abde07b5f6
commit a15da5ed43
11 changed files with 325 additions and 170 deletions
+3 -3
View File
@@ -247,7 +247,7 @@ pub struct FrameData {
height: u16,
help_visible: bool,
init: bool,
info_text: Option<String>,
info_text: Option<(String, Instant)>,
loading_icon: String,
selected_panel: SelectablePanel,
sorted_by: Option<(Header, SortedOrder)>,
@@ -347,8 +347,8 @@ fn draw_frame(f: &mut Frame, app_data: &Arc<Mutex<AppData>>, gui_state: &Arc<Mut
draw_blocks::chart(f, lower_main[1], app_data);
}
if let Some(info) = fd.info_text {
draw_blocks::info(f, &info);
if let Some((text, instant)) = fd.info_text {
draw_blocks::info(f, &text, instant, gui_state);
}
// Check if error, and show popup if so