fixed the navigation previous function, therefore we are now moving into the login properly, lets implement the auth now

This commit is contained in:
filipriec
2025-03-26 00:46:59 +01:00
parent 4601ba4094
commit 722c63af54
3 changed files with 9 additions and 10 deletions

6
Cargo.lock generated
View File

@@ -421,7 +421,7 @@ dependencies = [
[[package]]
name = "client"
version = "0.2.0"
version = "0.2.5"
dependencies = [
"common",
"crossterm",
@@ -457,7 +457,7 @@ dependencies = [
[[package]]
name = "common"
version = "0.2.0"
version = "0.2.5"
dependencies = [
"prost",
"serde",
@@ -2588,7 +2588,7 @@ dependencies = [
[[package]]
name = "server"
version = "0.2.0"
version = "0.2.5"
dependencies = [
"bcrypt",
"chrono",

View File

@@ -5,7 +5,7 @@ resolver = "2"
[workspace.package]
# TODO: idk how to do the name, fix later
# name = "Multieko2"
version = "0.2.0"
version = "0.2.5"
edition = "2021"
license = "GPL-3.0-or-later"
authors = ["Filip Priečinský <filippriec@gmail.com>"]

View File

@@ -108,13 +108,12 @@ pub fn previous_option(app_state: &mut AppState) {
if app_state.ui.show_intro {
app_state.ui.intro_state.previous_option();
} else {
// For other screens that might have options
if app_state.general.current_option == 0 {
// We'd need the option count here, but since it's not passed we can't wrap around correctly
// For now, just stay at 0
let option_count = app_state.profile_tree.profiles.len();
app_state.general.current_option = if app_state.general.current_option == 0 {
option_count.saturating_sub(1) // Wrap to last option
} else {
app_state.general.current_option -= 1;
}
app_state.general.current_option - 1
};
}
}