login page is now being properly displayed
This commit is contained in:
@@ -122,14 +122,8 @@ impl IntroState {
|
||||
pub fn handle_selection(&self, app_state: &mut crate::state::state::AppState) {
|
||||
match self.selected_option {
|
||||
0 => { /* Continue logic */ }
|
||||
1 => {
|
||||
app_state.ui.show_intro = false;
|
||||
app_state.ui.show_admin = true;
|
||||
}
|
||||
2 => {
|
||||
app_state.ui.show_intro = false;
|
||||
app_state.ui.show_login = true;
|
||||
}
|
||||
1 => {}
|
||||
2 => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,14 +124,23 @@ pub fn previous_option(app_state: &mut AppState) {
|
||||
pub fn select(app_state: &mut AppState) {
|
||||
if app_state.ui.show_intro {
|
||||
// Handle selection in intro screen
|
||||
if app_state.ui.intro_state.selected_option == 0 {
|
||||
// First option selected - show form
|
||||
app_state.ui.show_form = true;
|
||||
app_state.ui.show_admin = false;
|
||||
} else {
|
||||
// Second option selected - show admin
|
||||
app_state.ui.show_form = false;
|
||||
app_state.ui.show_admin = true;
|
||||
match app_state.ui.intro_state.selected_option {
|
||||
0 => { // Continue - show form
|
||||
app_state.ui.show_form = true;
|
||||
app_state.ui.show_admin = false;
|
||||
app_state.ui.show_login = false;
|
||||
}
|
||||
1 => { // Admin
|
||||
app_state.ui.show_form = false;
|
||||
app_state.ui.show_admin = true;
|
||||
app_state.ui.show_login = false;
|
||||
}
|
||||
2 => { // Login
|
||||
app_state.ui.show_form = false;
|
||||
app_state.ui.show_admin = false;
|
||||
app_state.ui.show_login = true;
|
||||
}
|
||||
_ => {} // Other options (shouldn't happen)
|
||||
}
|
||||
app_state.ui.show_intro = false;
|
||||
} else if app_state.ui.show_admin {
|
||||
|
||||
Reference in New Issue
Block a user