refactor: clarify content and tui ownership
This commit is contained in:
1 parent
078afe4b9d
commit
15d76c18a0
32 files changed
+893
-1144
No files matched your search
@@ -12,6 +12,8 @@ use std::sync::LazyLock;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use tui_prompts::{FocusState, State as PromptState, TextState};
|
||||
|
||||
use super::super::LoadState;
|
||||
|
||||
pub(crate) static WIZARD_STATE: LazyLock<Arc<Mutex<WizardState>>> =
|
||||
LazyLock::new(|| Arc::new(Mutex::new(WizardState::default())));
|
||||
// populated on confirm, consumed by the main event loop to actually create the instance
|
||||
@@ -36,15 +38,6 @@ pub enum WizardStep {
|
||||
Confirm,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub enum LoadState<T> {
|
||||
#[default]
|
||||
Idle,
|
||||
Loading,
|
||||
Loaded(T),
|
||||
Error(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct WizardState {
|
||||
pub step: WizardStep,
|
||||
|
||||
Reference in new issue
Block a user