login function moved

This commit is contained in:
filipriec
2025-08-23 21:05:02 +02:00
parent 597bdde7e1
commit fc2b65601e
3 changed files with 13 additions and 16 deletions

View File

@@ -12,6 +12,7 @@ use anyhow::{Context, Result};
use tokio::spawn;
use tokio::sync::mpsc;
use tracing::{info, error};
use anyhow::anyhow;
#[derive(Debug)]
pub enum LoginResult {
@@ -237,3 +238,15 @@ pub fn handle_login_result(
login_state.current_cursor_pos = 0;
true // Request redraw as dialog content changed
}
pub async fn handle_action(action: &str,) -> Result<String> {
match action {
"previous_entry" => {
Ok("Previous entry at tui/functions/login.rs not implemented".into())
}
"next_entry" => {
Ok("Next entry at tui/functions/login.rs not implemented".into())
}
_ => Err(anyhow!("Unknown login action: {}", action))
}
}

View File

@@ -2,7 +2,6 @@
pub mod admin;
pub mod intro;
pub mod login;
pub mod common;
pub use admin::*;

View File

@@ -1,15 +0,0 @@
// src/tui/functions/login.rs
use anyhow::{anyhow, Result};
pub async fn handle_action(action: &str,) -> Result<String> {
match action {
"previous_entry" => {
Ok("Previous entry at tui/functions/login.rs not implemented".into())
}
"next_entry" => {
Ok("Next entry at tui/functions/login.rs not implemented".into())
}
_ => Err(anyhow!("Unknown login action: {}", action))
}
}