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]] [[package]]
name = "client" name = "client"
version = "0.2.0" version = "0.2.5"
dependencies = [ dependencies = [
"common", "common",
"crossterm", "crossterm",
@@ -457,7 +457,7 @@ dependencies = [
[[package]] [[package]]
name = "common" name = "common"
version = "0.2.0" version = "0.2.5"
dependencies = [ dependencies = [
"prost", "prost",
"serde", "serde",
@@ -2588,7 +2588,7 @@ dependencies = [
[[package]] [[package]]
name = "server" name = "server"
version = "0.2.0" version = "0.2.5"
dependencies = [ dependencies = [
"bcrypt", "bcrypt",
"chrono", "chrono",

View File

@@ -5,7 +5,7 @@ resolver = "2"
[workspace.package] [workspace.package]
# TODO: idk how to do the name, fix later # TODO: idk how to do the name, fix later
# name = "Multieko2" # name = "Multieko2"
version = "0.2.0" version = "0.2.5"
edition = "2021" edition = "2021"
license = "GPL-3.0-or-later" license = "GPL-3.0-or-later"
authors = ["Filip Priečinský <filippriec@gmail.com>"] 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 { if app_state.ui.show_intro {
app_state.ui.intro_state.previous_option(); app_state.ui.intro_state.previous_option();
} else { } else {
// For other screens that might have options let option_count = app_state.profile_tree.profiles.len();
if app_state.general.current_option == 0 { app_state.general.current_option = 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 option_count.saturating_sub(1) // Wrap to last option
// For now, just stay at 0
} else { } else {
app_state.general.current_option -= 1; app_state.general.current_option - 1
} };
} }
} }