From 653048a54ace6608ed49ebb1e1bbe3979b2e775f Mon Sep 17 00:00:00 2001 From: Rusty Pickle Date: Sat, 11 Oct 2025 18:32:39 +0600 Subject: [PATCH] Update --- Cargo.lock | 8 ++++---- Cargo.toml | 6 +++--- app/Cargo.toml | 6 +++--- app/src/conn.rs | 6 +++--- app/src/migration.rs | 10 +++++----- app/src/modifier/delete_tx.rs | 4 ++-- app/src/modifier/new_activity.rs | 4 ++-- app/src/modifier/new_method.rs | 4 ++-- app/src/modifier/new_tx.rs | 4 ++-- app/src/modifier/shared.rs | 6 +++--- app/src/ui_helper/autofiller.rs | 4 ++-- app/src/ui_helper/stepper.rs | 2 +- app/src/ui_helper/verifier.rs | 2 +- app/src/utils.rs | 4 ++-- app/src/views/activity_view.rs | 6 +++--- app/src/views/chart_view.rs | 4 ++-- app/src/views/search_view.rs | 6 +++--- app/src/views/summary_models.rs | 2 +- app/src/views/summary_view.rs | 6 +++--- app/src/views/tx_view.rs | 8 ++++---- app/tests/add_tx.rs | 2 +- db/Cargo.toml | 4 ++-- db/src/lib.rs | 3 ++- db/src/models/activity_txs.rs | 2 +- db/src/models/balances.rs | 2 +- db/src/models/others.rs | 2 +- db/src/models/txs.rs | 2 +- shared/Cargo.toml | 2 +- tui/Cargo.toml | 4 ++-- tui/src/key_checker/key_handler.rs | 6 +++--- tui/src/page_handler/initializer.rs | 2 +- tui/src/page_handler/ui_handler.rs | 6 +++--- tui/src/page_handler/ui_state.rs | 2 +- tui/src/pages/activity_ui.rs | 2 +- tui/src/pages/add_tx_ui.rs | 2 +- tui/src/pages/chart_ui.rs | 4 ++-- tui/src/pages/home_ui.rs | 4 ++-- tui/src/pages/popups/models.rs | 2 +- tui/src/pages/search_ui.rs | 2 +- tui/src/pages/summary_ui.rs | 4 ++-- tui/src/tx_handler/tx_data.rs | 10 +++++----- tui/src/utility/utils.rs | 4 ++-- 42 files changed, 88 insertions(+), 87 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2a78ac..a9d68db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1934,7 +1934,7 @@ dependencies = [ [[package]] name = "rex-app" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "chrono", @@ -1947,7 +1947,7 @@ dependencies = [ [[package]] name = "rex-db" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "chrono", @@ -1959,7 +1959,7 @@ dependencies = [ [[package]] name = "rex-shared" -version = "0.1.0" +version = "0.2.0" [[package]] name = "rex-tui" @@ -2038,7 +2038,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7d41bd5..ebdece4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,9 @@ members = ["app", "db", "shared", "tui"] resolver = "2" [workspace.dependencies] -rex-shared = "0.1.0" -rex-db = "0.1.1" -rex-app = "0.1.1" +rex-shared = "0.2.0" +rex-db = "0.2.0" +rex-app = "0.2.0" chrono = "0.4.42" diesel = { version = "2.3.2", default-features = false, features = [ "returning_clauses_for_sqlite_3_35", diff --git a/app/Cargo.toml b/app/Cargo.toml index 6850f78..e62ad74 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rex-app" -version = "0.1.1" +version = "0.2.0" edition = "2024" description = """ Core functionality for Rex @@ -10,8 +10,8 @@ repository = "https://github.com/TheRustyPickle/Rex" license = "MIT" [dependencies] -db = { package = "rex-db", version = "0.1.1" } -shared = { package = "rex-shared", version = "0.1.0" } +rex-db.workspace = true +rex-shared.workspace = true chrono.workspace = true anyhow.workspace = true diesel.workspace = true diff --git a/app/src/conn.rs b/app/src/conn.rs index 2642968..dc96cd1 100644 --- a/app/src/conn.rs +++ b/app/src/conn.rs @@ -1,9 +1,9 @@ use anyhow::{Error, Result}; use chrono::NaiveDate; -pub use db::models::FetchNature; -use db::models::{Balance, FullTx, NewSearch, NewTx, Tag, Tx, TxMethod}; -use db::{Cache, ConnCache, get_connection, get_connection_no_migrations}; use diesel::{Connection, SqliteConnection}; +pub use rex_db::models::FetchNature; +use rex_db::models::{Balance, FullTx, NewSearch, NewTx, Tag, Tx, TxMethod}; +use rex_db::{Cache, ConnCache, get_connection, get_connection_no_migrations}; use std::collections::{HashMap, HashSet}; use crate::modifier::{ diff --git a/app/src/migration.rs b/app/src/migration.rs index c0c3827..5a09949 100644 --- a/app/src/migration.rs +++ b/app/src/migration.rs @@ -1,13 +1,13 @@ use anyhow::{Error, Result}; use chrono::{Datelike, Months, NaiveDate, NaiveTime}; -use db::ConnCache; -use db::models::{ - Activity, ActivityNature, ActivityTx, ActivityTxTag, Balance, FetchNature, NewTag, NewTx, Tag, - TxMethod, TxTag, TxType, -}; use diesel::prelude::*; use diesel::sql_query; use diesel::sql_types::{Integer, Text}; +use rex_db::ConnCache; +use rex_db::models::{ + Activity, ActivityNature, ActivityTx, ActivityTxTag, Balance, FetchNature, NewTag, NewTx, Tag, + TxMethod, TxTag, TxType, +}; use std::collections::{HashMap, HashSet}; use std::io::Write; diff --git a/app/src/modifier/delete_tx.rs b/app/src/modifier/delete_tx.rs index fabed65..aa41e22 100644 --- a/app/src/modifier/delete_tx.rs +++ b/app/src/modifier/delete_tx.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use db::ConnCache; -use db::models::{Balance, FullTx, Tx, TxTag, TxType}; +use rex_db::ConnCache; +use rex_db::models::{Balance, FullTx, Tx, TxTag, TxType}; use crate::modifier::tidy_balances; diff --git a/app/src/modifier/new_activity.rs b/app/src/modifier/new_activity.rs index 464ccfe..c823218 100644 --- a/app/src/modifier/new_activity.rs +++ b/app/src/modifier/new_activity.rs @@ -1,6 +1,6 @@ use anyhow::{Result, anyhow}; -use db::ConnCache; -use db::models::{ +use rex_db::ConnCache; +use rex_db::models::{ ActivityNature, ActivityTxTag, FullTx, NewActivity, NewActivityTx, NewSearch, NewTx, Tag, }; diff --git a/app/src/modifier/new_method.rs b/app/src/modifier/new_method.rs index 89ae8f2..63e5c07 100644 --- a/app/src/modifier/new_method.rs +++ b/app/src/modifier/new_method.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use db::ConnCache; -use db::models::{Balance, NewTxMethod, TxMethod}; +use rex_db::ConnCache; +use rex_db::models::{Balance, NewTxMethod, TxMethod}; pub(crate) fn add_new_tx_methods( method_list: &Vec, diff --git a/app/src/modifier/new_tx.rs b/app/src/modifier/new_tx.rs index 4a517a6..7b87135 100644 --- a/app/src/modifier/new_tx.rs +++ b/app/src/modifier/new_tx.rs @@ -1,6 +1,6 @@ use anyhow::{Context, Result}; -use db::ConnCache; -use db::models::{Balance, NewTag, NewTx, Tag, Tx, TxTag, TxType}; +use rex_db::ConnCache; +use rex_db::models::{Balance, NewTag, NewTx, Tag, Tx, TxTag, TxType}; use crate::modifier::tidy_balances; diff --git a/app/src/modifier/shared.rs b/app/src/modifier/shared.rs index 0d6ce69..794ed66 100644 --- a/app/src/modifier/shared.rs +++ b/app/src/modifier/shared.rs @@ -1,8 +1,8 @@ use anyhow::{Result, anyhow}; use chrono::{Days, Local, Months, NaiveDate, NaiveTime}; -use db::ConnCache; -use db::models::{Balance, DateNature, FetchNature, NewSearch, NewTx, Tx, TxType}; -use shared::models::Dollar; +use rex_db::ConnCache; +use rex_db::models::{Balance, DateNature, FetchNature, NewSearch, NewTx, Tx, TxType}; +use rex_shared::models::Dollar; use crate::utils::parse_amount_nature_cent; diff --git a/app/src/ui_helper/autofiller.rs b/app/src/ui_helper/autofiller.rs index 03e3d3c..b5a2b66 100644 --- a/app/src/ui_helper/autofiller.rs +++ b/app/src/ui_helper/autofiller.rs @@ -1,5 +1,5 @@ -use db::ConnCache; -use db::models::TxType; +use rex_db::ConnCache; +use rex_db::models::TxType; use crate::conn::MutDbConn; use crate::ui_helper::get_best_match; diff --git a/app/src/ui_helper/stepper.rs b/app/src/ui_helper/stepper.rs index 610748d..4e9c0d9 100644 --- a/app/src/ui_helper/stepper.rs +++ b/app/src/ui_helper/stepper.rs @@ -1,5 +1,5 @@ use chrono::{Duration, Months, NaiveDate}; -use db::ConnCache; +use rex_db::ConnCache; use crate::conn::MutDbConn; use crate::ui_helper::{ diff --git a/app/src/ui_helper/verifier.rs b/app/src/ui_helper/verifier.rs index 9ad28e0..0fa1427 100644 --- a/app/src/ui_helper/verifier.rs +++ b/app/src/ui_helper/verifier.rs @@ -2,7 +2,7 @@ use std::cmp::Ordering; use std::collections::HashSet; use chrono::NaiveDate; -use db::ConnCache; +use rex_db::ConnCache; use crate::conn::MutDbConn; use crate::ui_helper::{DateType, Field, Output, VerifierError, get_best_match}; diff --git a/app/src/utils.rs b/app/src/utils.rs index 59448d2..f811291 100644 --- a/app/src/utils.rs +++ b/app/src/utils.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use db::models::AmountNature; -use shared::models::{Cent, Dollar}; +use rex_db::models::AmountNature; +use rex_shared::models::{Cent, Dollar}; pub fn month_name_to_num(name: &str) -> u32 { match name { diff --git a/app/src/views/activity_view.rs b/app/src/views/activity_view.rs index 6a42dec..dfb96fb 100644 --- a/app/src/views/activity_view.rs +++ b/app/src/views/activity_view.rs @@ -1,8 +1,8 @@ use anyhow::Result; use chrono::NaiveDate; -use db::ConnCache; -pub use db::models::FullActivityTx; -use db::models::{Activity, ActivityNature, ActivityWithTxs}; +use rex_db::ConnCache; +pub use rex_db::models::FullActivityTx; +use rex_db::models::{Activity, ActivityNature, ActivityWithTxs}; pub struct ActivityView(Vec); diff --git a/app/src/views/chart_view.rs b/app/src/views/chart_view.rs index 79b56b5..87a5a9b 100644 --- a/app/src/views/chart_view.rs +++ b/app/src/views/chart_view.rs @@ -1,6 +1,6 @@ use chrono::NaiveDate; -use db::models::FullTx; -use shared::models::Cent; +use rex_db::models::FullTx; +use rex_shared::models::Cent; use std::collections::{HashMap, HashSet}; use crate::views::TxViewGroup; diff --git a/app/src/views/search_view.rs b/app/src/views/search_view.rs index 1f9a06a..a4a6893 100644 --- a/app/src/views/search_view.rs +++ b/app/src/views/search_view.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use db::ConnCache; -use db::models::{FullTx, NewSearch}; +use rex_db::ConnCache; +use rex_db::models::{FullTx, NewSearch}; pub struct SearchView(Vec); @@ -18,7 +18,7 @@ pub(crate) fn get_search_txs( impl SearchView { #[must_use] pub fn tx_array(&self) -> Vec> { - self.0.iter().map(db::models::FullTx::to_array).collect() + self.0.iter().map(FullTx::to_array).collect() } #[must_use] diff --git a/app/src/views/summary_models.rs b/app/src/views/summary_models.rs index f071867..66d55da 100644 --- a/app/src/views/summary_models.rs +++ b/app/src/views/summary_models.rs @@ -1,5 +1,5 @@ use chrono::NaiveDate; -use shared::models::{Cent, Dollar}; +use rex_shared::models::{Cent, Dollar}; use std::fmt; #[derive(Default, Clone)] diff --git a/app/src/views/summary_view.rs b/app/src/views/summary_view.rs index 40d7b2a..ba27c2d 100644 --- a/app/src/views/summary_view.rs +++ b/app/src/views/summary_view.rs @@ -1,8 +1,8 @@ use anyhow::Result; use chrono::{Datelike, NaiveDate}; -use db::ConnCache; -use db::models::{FetchNature, FullTx, TxType}; -use shared::models::{Cent, Dollar}; +use rex_db::ConnCache; +use rex_db::models::{FetchNature, FullTx, TxType}; +use rex_shared::models::{Cent, Dollar}; use std::collections::HashMap; use crate::utils::{get_percentages, month_year_to_unique}; diff --git a/app/src/views/tx_view.rs b/app/src/views/tx_view.rs index ce24ae4..b9e4527 100644 --- a/app/src/views/tx_view.rs +++ b/app/src/views/tx_view.rs @@ -1,9 +1,9 @@ use anyhow::Result; use chrono::NaiveDate; -use db::ConnCache; -pub use db::models::FullTx; -use db::models::{Balance, FetchNature, TxMethod, TxType}; -use shared::models::{Cent, Dollar}; +use rex_db::ConnCache; +pub use rex_db::models::FullTx; +use rex_db::models::{Balance, FetchNature, TxMethod, TxType}; +use rex_shared::models::{Cent, Dollar}; use std::collections::HashMap; use crate::conn::DbConn; diff --git a/app/tests/add_tx.rs b/app/tests/add_tx.rs index 55fb6a9..b73106b 100644 --- a/app/tests/add_tx.rs +++ b/app/tests/add_tx.rs @@ -1,7 +1,7 @@ use chrono::NaiveDate; -use db::ConnCache; use rex_app::conn::FetchNature; use rex_app::modifier::parse_tx_fields; +use rex_db::ConnCache; use std::fs; use crate::common::create_test_db; diff --git a/db/Cargo.toml b/db/Cargo.toml index 13d9b6c..ebd6a1c 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rex-db" -version = "0.1.1" +version = "0.2.0" edition = "2024" description = """ Rex database models using diesel @@ -10,7 +10,7 @@ repository = "https://github.com/TheRustyPickle/Rex" license = "MIT" [dependencies] -shared = { package = "rex-shared", version = "0.1.0" } +rex-shared.workspace = true diesel.workspace = true chrono.workspace = true anyhow.workspace = true diff --git a/db/src/lib.rs b/db/src/lib.rs index e17bd77..a9e4afe 100644 --- a/db/src/lib.rs +++ b/db/src/lib.rs @@ -8,7 +8,8 @@ use std::collections::{HashMap, HashSet}; use crate::models::{FullTx, Tag, TxMethod}; -pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("../db/src/migrations"); +// pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("../db/src/migrations"); +pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("src/migrations"); pub trait ConnCache { fn conn(&mut self) -> &mut SqliteConnection; diff --git a/db/src/models/activity_txs.rs b/db/src/models/activity_txs.rs index 1611890..1349724 100644 --- a/db/src/models/activity_txs.rs +++ b/db/src/models/activity_txs.rs @@ -1,7 +1,7 @@ use chrono::Datelike; use diesel::prelude::*; use diesel::result::Error; -use shared::models::Cent; +use rex_shared::models::Cent; use std::collections::HashMap; use crate::ConnCache; diff --git a/db/src/models/balances.rs b/db/src/models/balances.rs index 4f94e6d..96b1bae 100644 --- a/db/src/models/balances.rs +++ b/db/src/models/balances.rs @@ -2,7 +2,7 @@ use chrono::{Datelike, Months, NaiveDate}; use diesel::prelude::*; use diesel::result::Error; use diesel::upsert::excluded; -use shared::models::Cent; +use rex_shared::models::Cent; use std::collections::{HashMap, HashSet}; use crate::ConnCache; diff --git a/db/src/models/others.rs b/db/src/models/others.rs index d0e727d..44ca452 100644 --- a/db/src/models/others.rs +++ b/db/src/models/others.rs @@ -1,5 +1,5 @@ use chrono::NaiveDateTime; -use shared::models::Cent; +use rex_shared::models::Cent; use std::fmt::{self, Display}; #[derive(Clone, Debug, Copy)] diff --git a/db/src/models/txs.rs b/db/src/models/txs.rs index 374d789..631ca6d 100644 --- a/db/src/models/txs.rs +++ b/db/src/models/txs.rs @@ -3,7 +3,7 @@ use diesel::dsl::{exists, sql}; use diesel::prelude::*; use diesel::result::Error; use diesel::sql_types::Bool; -use shared::models::Cent; +use rex_shared::models::Cent; use std::collections::HashMap; use crate::ConnCache; diff --git a/shared/Cargo.toml b/shared/Cargo.toml index fa14635..ac420ed 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rex-shared" -version = "0.1.0" +version = "0.2.0" edition = "2024" description = """ Shared code for Rex diff --git a/tui/Cargo.toml b/tui/Cargo.toml index 49f3dd0..03da246 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -21,8 +21,8 @@ test = false bench = false [dependencies] -app = { package = "rex-app", version = "0.1.1" } -shared = { package = "rex-shared", version = "0.1.0" } +rex-app.workspace = true +rex-shared.workspace = true anyhow.workspace = true crossterm = "0.29.0" chrono = "0.4.42" diff --git a/tui/src/key_checker/key_handler.rs b/tui/src/key_checker/key_handler.rs index ecd68b0..3b4d3a3 100644 --- a/tui/src/key_checker/key_handler.rs +++ b/tui/src/key_checker/key_handler.rs @@ -1,8 +1,8 @@ use anyhow::{Result, anyhow}; -use app::conn::{DbConn, FetchNature}; -use app::ui_helper::{DateType, StepType}; -use app::views::{ActivityView, ChartView, FullSummary, SearchView, SummaryView, TxViewGroup}; use crossterm::event::{KeyCode, KeyEvent}; +use rex_app::conn::{DbConn, FetchNature}; +use rex_app::ui_helper::{DateType, StepType}; +use rex_app::views::{ActivityView, ChartView, FullSummary, SearchView, SummaryView, TxViewGroup}; use std::collections::HashMap; use std::fmt::Write; diff --git a/tui/src/page_handler/initializer.rs b/tui/src/page_handler/initializer.rs index 7a76925..f2f8bb6 100644 --- a/tui/src/page_handler/initializer.rs +++ b/tui/src/page_handler/initializer.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use app::conn::get_conn; use atty::Stream; +use rex_app::conn::get_conn; use std::env::set_current_dir; use std::fs::{self, File}; use std::io::prelude::*; diff --git a/tui/src/page_handler/ui_handler.rs b/tui/src/page_handler/ui_handler.rs index 48cb8f0..2d9b32a 100644 --- a/tui/src/page_handler/ui_handler.rs +++ b/tui/src/page_handler/ui_handler.rs @@ -1,10 +1,10 @@ -use app::conn::{DbConn, FetchNature}; -use app::ui_helper::DateType; -use app::views::SearchView; use crossterm::event::{self, Event, KeyEventKind, poll}; use ratatui::Terminal; use ratatui::backend::Backend; use ratatui::style::Color; +use rex_app::conn::{DbConn, FetchNature}; +use rex_app::ui_helper::DateType; +use rex_app::views::SearchView; use std::time::Duration; use crate::config::Config; diff --git a/tui/src/page_handler/ui_state.rs b/tui/src/page_handler/ui_state.rs index 1e6ca35..46b99fe 100644 --- a/tui/src/page_handler/ui_state.rs +++ b/tui/src/page_handler/ui_state.rs @@ -1,7 +1,7 @@ -use app::conn::DbConn; use chrono::Datelike; use chrono::prelude::Local; use ratatui::widgets::TableState; +use rex_app::conn::DbConn; use strum_macros::Display; pub const MONTHS: [&str; 12] = [ diff --git a/tui/src/pages/activity_ui.rs b/tui/src/pages/activity_ui.rs index a9b0963..82fa8dc 100644 --- a/tui/src/pages/activity_ui.rs +++ b/tui/src/pages/activity_ui.rs @@ -1,8 +1,8 @@ -use app::views::ActivityView; use ratatui::Frame; use ratatui::layout::{Constraint, Direction, Layout}; use ratatui::style::{Modifier, Style}; use ratatui::widgets::{Cell, Row, Table}; +use rex_app::views::ActivityView; use thousands::Separable; use crate::page_handler::{ diff --git a/tui/src/pages/add_tx_ui.rs b/tui/src/pages/add_tx_ui.rs index fba271f..bdb6758 100644 --- a/tui/src/pages/add_tx_ui.rs +++ b/tui/src/pages/add_tx_ui.rs @@ -1,9 +1,9 @@ -use app::conn::DbConn; use ratatui::Frame; use ratatui::layout::{Alignment, Constraint, Direction, Layout, Position}; use ratatui::style::{Modifier, Style}; use ratatui::text::{Line, Span}; use ratatui::widgets::{Cell, Paragraph, Row, Table}; +use rex_app::conn::DbConn; use thousands::Separable; use crate::outputs::TxType; diff --git a/tui/src/pages/chart_ui.rs b/tui/src/pages/chart_ui.rs index b31ff20..023e37a 100644 --- a/tui/src/pages/chart_ui.rs +++ b/tui/src/pages/chart_ui.rs @@ -1,5 +1,3 @@ -use app::conn::DbConn; -use app::views::ChartView; use chrono::{Duration, naive::NaiveDate}; use ratatui::Frame; use ratatui::layout::{Constraint, Direction, Layout}; @@ -7,6 +5,8 @@ use ratatui::style::{Color, Modifier, Style}; use ratatui::symbols::Marker; use ratatui::text::Span; use ratatui::widgets::{Axis, Block, Chart, Dataset, GraphType}; +use rex_app::conn::DbConn; +use rex_app::views::ChartView; use std::collections::HashMap; use crate::page_handler::{BACKGROUND, BOX, ChartTab, IndexedData, SELECTED}; diff --git a/tui/src/pages/home_ui.rs b/tui/src/pages/home_ui.rs index 73ae6e3..3b31383 100644 --- a/tui/src/pages/home_ui.rs +++ b/tui/src/pages/home_ui.rs @@ -1,9 +1,9 @@ -use app::conn::DbConn; -use app::views::TxViewGroup; use ratatui::Frame; use ratatui::layout::{Constraint, Direction, Layout}; use ratatui::style::{Modifier, Style}; use ratatui::widgets::{Cell, Row, Table}; +use rex_app::conn::DbConn; +use rex_app::views::TxViewGroup; use thousands::Separable; use crate::page_handler::{ diff --git a/tui/src/pages/popups/models.rs b/tui/src/pages/popups/models.rs index 159673b..6e9ae83 100644 --- a/tui/src/pages/popups/models.rs +++ b/tui/src/pages/popups/models.rs @@ -1,7 +1,7 @@ use anyhow::{Result, anyhow}; -use app::conn::DbConn; use ratatui::Frame; use ratatui::style::Color; +use rex_app::conn::DbConn; use rfd::FileDialog; use std::path::PathBuf; use strum::IntoEnumIterator; diff --git a/tui/src/pages/search_ui.rs b/tui/src/pages/search_ui.rs index 7bfec7a..b72d3eb 100644 --- a/tui/src/pages/search_ui.rs +++ b/tui/src/pages/search_ui.rs @@ -1,9 +1,9 @@ -use app::ui_helper::DateType; use ratatui::Frame; use ratatui::layout::{Alignment, Constraint, Direction, Layout, Position}; use ratatui::style::{Modifier, Style}; use ratatui::text::{Line, Span}; use ratatui::widgets::{Cell, Paragraph, Row, Table}; +use rex_app::ui_helper::DateType; use thousands::Separable; use crate::outputs::TxType; diff --git a/tui/src/pages/summary_ui.rs b/tui/src/pages/summary_ui.rs index 3466f4a..51d9f73 100644 --- a/tui/src/pages/summary_ui.rs +++ b/tui/src/pages/summary_ui.rs @@ -1,9 +1,9 @@ -use app::conn::DbConn; -use app::views::FullSummary; use ratatui::Frame; use ratatui::layout::{Constraint, Direction, Layout}; use ratatui::style::{Modifier, Style}; use ratatui::widgets::{Cell, Row, Table}; +use rex_app::conn::DbConn; +use rex_app::views::FullSummary; use thousands::Separable; use crate::page_handler::{ diff --git a/tui/src/tx_handler/tx_data.rs b/tui/src/tx_handler/tx_data.rs index 8b176cf..a7f1e60 100644 --- a/tui/src/tx_handler/tx_data.rs +++ b/tui/src/tx_handler/tx_data.rs @@ -1,10 +1,10 @@ use anyhow::Result as AResult; -use app::conn::DbConn; -use app::modifier::{parse_search_fields, parse_tx_fields}; -use app::ui_helper::{DateType, Output, StepType, SteppingError, VerifierError}; -use app::views::{FullTx, PartialTx, SearchView, TxViewGroup}; use chrono::prelude::Local; -use shared::models::Cent; +use rex_app::conn::DbConn; +use rex_app::modifier::{parse_search_fields, parse_tx_fields}; +use rex_app::ui_helper::{DateType, Output, StepType, SteppingError, VerifierError}; +use rex_app::views::{FullTx, PartialTx, SearchView, TxViewGroup}; +use rex_shared::models::Cent; use std::cmp::Ordering; use crate::outputs::{CheckingError, ComparisonType, TxType}; diff --git a/tui/src/utility/utils.rs b/tui/src/utility/utils.rs index 3219841..aa85562 100644 --- a/tui/src/utility/utils.rs +++ b/tui/src/utility/utils.rs @@ -1,6 +1,4 @@ use anyhow::Result; -use app::conn::{get_conn, get_conn_old}; -use app::migration::start_migration; use crossterm::execute; use crossterm::terminal::{ EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode, enable_raw_mode, @@ -11,6 +9,8 @@ use ratatui::layout::{Constraint, Direction, Layout, Rect}; use ratatui::style::{Modifier, Style}; use ratatui::text::{Line, Span}; use ratatui::widgets::{Block, BorderType, Borders, Tabs}; +use rex_app::conn::{get_conn, get_conn_old}; +use rex_app::migration::start_migration; use std::collections::HashMap; use std::io::{Stdout, stdout}; use std::path::{Path, PathBuf};