Add manual input elements to the app an ui #216

Merged
wojtek merged 17 commits from 188---add-option-for-manual-input-during-fetch into main 2024-09-15 15:20:11 +02:00
2 changed files with 4 additions and 28 deletions
Showing only changes of commit 4c39988d96 - Show all commits

View File

@ -26,7 +26,7 @@ use match_state::MatchState;
use reload_state::ReloadState;
use search_state::SearchState;
use super::{AppMode, IAppBase};
use super::{AppMode, IAppBase, IAppState};
pub type App = AppState<
AppMachine<BrowseState>,
@ -130,36 +130,11 @@ impl IApp for App {
self
}
fn state(
self,
) -> AppState<
Self::BrowseState,
Self::InfoState,
Self::ReloadState,
Self::SearchState,
Self::FetchState,
Self::MatchState,
Self::ErrorState,
Self::CriticalState,
> {
fn state(self) -> IAppState!() {
self
}
fn mode(
mut self,
) -> super::AppMode<
AppState<
Self::BrowseState,
Self::InfoState,
Self::ReloadState,
Self::SearchState,
Self::FetchState,
Self::MatchState,
Self::ErrorState,
Self::CriticalState,
>,
Self::InputMode,
> {
fn mode(mut self) -> super::AppMode<IAppState!(), Self::InputMode> {
if let Some(input) = self.inner_mut().input.take() {
AppMode::Input(AppInputMode::new(input, self.state()))
} else {

View File

@ -30,6 +30,7 @@ macro_rules! IAppState {
Self::FetchState, Self::MatchState, Self::ErrorState, Self::CriticalState>
};
}
use IAppState;
pub trait IApp {
type BrowseState: IAppBase<APP = Self> + IAppInteractBrowse<APP = Self>;