login page now in a separate dir

This commit is contained in:
filipriec
2025-08-23 19:48:23 +02:00
parent d5cfe59f47
commit f56092e86c
11 changed files with 54 additions and 14 deletions

View File

@@ -0,0 +1,30 @@
// src/pages/login/state.rs
use canvas::AppMode;
#[derive(Debug, Clone)]
pub struct LoginState {
pub username: String,
pub password: String,
pub error_message: Option<String>,
pub current_field: usize,
pub current_cursor_pos: usize,
pub has_unsaved_changes: bool,
pub login_request_pending: bool,
pub app_mode: AppMode,
}
impl Default for LoginState {
fn default() -> Self {
Self {
username: String::new(),
password: String::new(),
error_message: None,
current_field: 0,
current_cursor_pos: 0,
has_unsaved_changes: false,
login_request_pending: false,
app_mode: AppMode::Edit,
}
}
}