début du ui
This commit is contained in:
@@ -6,6 +6,7 @@ use crate::{
|
||||
app::{App, CurrentScreen},
|
||||
ui::ui,
|
||||
};
|
||||
use app::CurrentWidget;
|
||||
use ratatui::{
|
||||
Terminal,
|
||||
crossterm::{
|
||||
@@ -55,6 +56,12 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) -> io::Result<
|
||||
KeyCode::Char('q') => {
|
||||
app.current_screen = CurrentScreen::Exiting;
|
||||
}
|
||||
KeyCode::Right => {
|
||||
app.current_widget = CurrentWidget::TrxList;
|
||||
}
|
||||
KeyCode::Left => {
|
||||
app.current_widget = CurrentWidget::AccountList;
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
CurrentScreen::Exiting => match key.code {
|
||||
@@ -100,7 +107,7 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) -> io::Result<
|
||||
|
||||
// match choice {
|
||||
// "1" => {
|
||||
// let accounts = data_layer::get_accounts(&connection);
|
||||
// let accounts = data_layer::get_accounts)(&connection);
|
||||
// let mut total = 0.0;
|
||||
// for ac in accounts.iter() {
|
||||
// let ac_total = ac.get_total(&connection);
|
||||
|
||||
Reference in New Issue
Block a user