Skip to content

Commit

Permalink
Merge pull request #74
Browse files Browse the repository at this point in the history
Update popup text
  • Loading branch information
TheRustyPickle committed Mar 3, 2024
2 parents 58609b1 + f62308c commit 6d1ffd9
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 94 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rex-tui"
version = "0.1.14"
version = "0.1.15"
edition = "2021"
authors = ["TheRustyPickle <rusty.pickle94@gmail.com>"]
readme = "README.md"
Expand Down
13 changes: 7 additions & 6 deletions src/key_checker/key_handler.rs
Expand Up @@ -224,7 +224,7 @@ impl<'a> InputKeyHandler<'a> {

#[cfg(not(tarpaulin_include))]
pub fn go_history(&mut self) {
*self.page = CurrentUi::History;
*self.page = CurrentUi::Activity;
}

/// Turns on help popup
Expand All @@ -236,7 +236,8 @@ impl<'a> InputKeyHandler<'a> {
CurrentUi::Chart => *self.popup = PopupState::ChartHelp,
CurrentUi::Summary => *self.popup = PopupState::SummaryHelp,
CurrentUi::Search => *self.popup = PopupState::SearchHelp,
CurrentUi::Initial | CurrentUi::History => {}
CurrentUi::Activity => *self.popup = PopupState::ActivityHelp,
CurrentUi::Initial => {}
}
}

Expand Down Expand Up @@ -539,7 +540,7 @@ impl<'a> InputKeyHandler<'a> {
}
}
}
CurrentUi::History => match self.history_tab {
CurrentUi::Activity => match self.history_tab {
HistoryTab::Years => {
self.history_months.set_index_zero();
self.history_years.previous();
Expand Down Expand Up @@ -608,7 +609,7 @@ impl<'a> InputKeyHandler<'a> {
}
SummaryTab::Table => {}
},
CurrentUi::History => match self.history_tab {
CurrentUi::Activity => match self.history_tab {
HistoryTab::Years => {
self.history_months.set_index_zero();
self.history_years.next();
Expand All @@ -633,7 +634,7 @@ impl<'a> InputKeyHandler<'a> {
CurrentUi::Summary => self.do_summary_up(),
CurrentUi::Chart => self.do_chart_up(),
CurrentUi::Search => self.do_search_up(),
CurrentUi::History => self.do_history_up(),
CurrentUi::Activity => self.do_history_up(),
CurrentUi::Initial => {}
}
self.check_autofill();
Expand All @@ -648,7 +649,7 @@ impl<'a> InputKeyHandler<'a> {
CurrentUi::Summary => self.do_summary_down(),
CurrentUi::Chart => self.do_chart_down(),
CurrentUi::Search => self.do_search_down(),
CurrentUi::History => self.do_history_down(),
CurrentUi::Activity => self.do_history_down(),
CurrentUi::Initial => {}
}
self.check_autofill();
Expand Down
4 changes: 2 additions & 2 deletions src/page_handler/ui_handler.rs
Expand Up @@ -293,7 +293,7 @@ pub fn start_app<B: Backend>(
&mut search_table,
&search_date_type,
),
CurrentUi::History => history_ui(
CurrentUi::Activity => history_ui(
f,
&history_months,
&history_years,
Expand Down Expand Up @@ -394,7 +394,7 @@ pub fn start_app<B: Backend>(
CurrentUi::Chart => chart_keys(&mut handler),
CurrentUi::Summary => summary_keys(&mut handler),
CurrentUi::Search => search_keys(&mut handler),
CurrentUi::History => history_keys(&mut handler),
CurrentUi::Activity => history_keys(&mut handler),
};

// If there is a status it means it needs to be handled outside the UI
Expand Down
3 changes: 2 additions & 1 deletion src/page_handler/ui_state.rs
Expand Up @@ -168,7 +168,7 @@ pub enum CurrentUi {
Chart,
Summary,
Search,
History,
Activity,
}

/// Indicates which popup is currently on and is being shown in the screen
Expand All @@ -179,6 +179,7 @@ pub enum PopupState {
ChartHelp,
SummaryHelp,
SearchHelp,
ActivityHelp,
DeleteFailed(String),
TxDeletion,
Nothing,
Expand Down

0 comments on commit 6d1ffd9

Please sign in to comment.