fixed the navigation previous function, therefore we are now moving into the login properly, lets implement the auth now
This commit is contained in:
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -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",
|
||||
|
||||
@@ -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>"]
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user