refactor: extract cli and config into separate modules
This commit is contained in:
1 parent
03c87a8df0
commit
159b21d39a
17 files changed
+479
-2436
No files matched your search
+2
-3
@@ -1,4 +1,6 @@
|
||||
pub mod layout;
|
||||
pub mod logging;
|
||||
pub mod theme;
|
||||
pub mod widgets;
|
||||
|
||||
use std::io::{stdout, Result, Stdout};
|
||||
@@ -10,7 +12,6 @@ use crossterm::{
|
||||
use ratatui::{prelude::CrosstermBackend, Terminal};
|
||||
|
||||
pub fn show() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
let mut terminal = init_ratatui()?;
|
||||
let result = layout::App::default().run(&mut terminal);
|
||||
if let Err(err) = restore_ratatui() {
|
||||
@@ -22,8 +23,6 @@ pub fn show() -> color_eyre::Result<()> {
|
||||
result
|
||||
}
|
||||
|
||||
/// TUI Impl
|
||||
|
||||
pub type Tui = Terminal<CrosstermBackend<Stdout>>;
|
||||
|
||||
fn init_ratatui() -> Result<Tui> {
|
||||
|
||||
Reference in new issue
Block a user