This repository has been archived on 2024-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
core/src/main.rs

24 lines
447 B
Rust
Raw Normal View History

2023-06-14 21:49:20 +00:00
mod ui;
mod accounts;
mod app;
2023-06-14 21:49:20 +00:00
2023-07-01 10:44:11 +00:00
use cli_log::{error, warn, info};
2023-06-14 21:49:20 +00:00
#[tokio::main]
async fn main() -> anyhow::Result<()> {
2023-07-01 10:44:11 +00:00
cli_log::init_cli_log!();
let mut app = app::App::new();
2023-06-23 03:41:26 +00:00
app.fill_test_data();
2023-07-01 10:44:11 +00:00
let mut ui = ui::UI::new();
if app.accounts_manager.num_accounts() == 0 {
info!("No saved sessions found -> jumping into setup");
ui.setup(&mut app).await?;
}
ui.main(&mut app).await?;
2023-06-14 21:49:20 +00:00
Ok(())
}