register 2
This commit is contained in:
@@ -14,12 +14,14 @@ use ratatui::layout::{Constraint, Direction, Layout};
|
||||
use ratatui::Frame;
|
||||
use crate::state::pages::form::FormState;
|
||||
use crate::state::pages::auth::AuthState;
|
||||
use crate::state::pages::auth::RegisterState;
|
||||
use crate::state::state::AppState;
|
||||
|
||||
pub fn render_ui(
|
||||
f: &mut Frame,
|
||||
form_state: &mut FormState,
|
||||
auth_state: &mut AuthState,
|
||||
register_state: &RegisterState,
|
||||
theme: &Theme,
|
||||
is_edit_mode: bool,
|
||||
total_count: u64,
|
||||
@@ -43,8 +45,16 @@ pub fn render_ui(
|
||||
|
||||
let main_content_area = root[0];
|
||||
if app_state.ui.show_intro {
|
||||
// Use app_state's intro_state directly
|
||||
app_state.ui.intro_state.render(f, main_content_area, theme);
|
||||
} else if app_state.ui.show_register {
|
||||
render_register(
|
||||
f,
|
||||
main_content_area,
|
||||
theme,
|
||||
register_state,
|
||||
app_state,
|
||||
register_state.current_field < 4
|
||||
);
|
||||
}else if app_state.ui.show_login {
|
||||
render_login(
|
||||
f,
|
||||
|
||||
Reference in New Issue
Block a user