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) {
|
pub fn handle_selection(&self, app_state: &mut crate::state::state::AppState) {
|
||||||
match self.selected_option {
|
match self.selected_option {
|
||||||
0 => { /* Continue logic */ }
|
0 => { /* Continue logic */ }
|
||||||
1 => {
|
1 => {}
|
||||||
app_state.ui.show_intro = false;
|
2 => {}
|
||||||
app_state.ui.show_admin = true;
|
|
||||||
}
|
|
||||||
2 => {
|
|
||||||
app_state.ui.show_intro = false;
|
|
||||||
app_state.ui.show_login = true;
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,14 +124,23 @@ pub fn previous_option(app_state: &mut AppState) {
|
|||||||
pub fn select(app_state: &mut AppState) {
|
pub fn select(app_state: &mut AppState) {
|
||||||
if app_state.ui.show_intro {
|
if app_state.ui.show_intro {
|
||||||
// Handle selection in intro screen
|
// Handle selection in intro screen
|
||||||
if app_state.ui.intro_state.selected_option == 0 {
|
match app_state.ui.intro_state.selected_option {
|
||||||
// First option selected - show form
|
0 => { // Continue - show form
|
||||||
app_state.ui.show_form = true;
|
app_state.ui.show_form = true;
|
||||||
app_state.ui.show_admin = false;
|
app_state.ui.show_admin = false;
|
||||||
} else {
|
app_state.ui.show_login = false;
|
||||||
// Second option selected - show admin
|
}
|
||||||
app_state.ui.show_form = false;
|
1 => { // Admin
|
||||||
app_state.ui.show_admin = true;
|
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;
|
app_state.ui.show_intro = false;
|
||||||
} else if app_state.ui.show_admin {
|
} else if app_state.ui.show_admin {
|
||||||
|
|||||||
Reference in New Issue
Block a user