feat: erste Weboberfläche (nur lesend) mit Anmeldung über Key-Recht ui, Status-Endpunkt (#1048, #1049)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,14 +1,21 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
use std::time::Instant;
|
||||
|
||||
use nexus_store::Store;
|
||||
|
||||
use crate::runtime::Runtime;
|
||||
use crate::ui::Session;
|
||||
|
||||
/// Gemeinsamer Zustand aller Anfragen.
|
||||
pub struct AppState {
|
||||
store: Mutex<Store>,
|
||||
pub runtime: Runtime,
|
||||
pub http: reqwest::Client,
|
||||
/// Start des Gateways (für die Laufzeit in der Übersicht).
|
||||
pub started: Instant,
|
||||
/// Sitzungen der Weboberfläche (nur im Speicher; ein Neustart meldet ab).
|
||||
pub sessions: Mutex<HashMap<String, Session>>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
@ -21,6 +28,8 @@ impl AppState {
|
||||
store: Mutex::new(store),
|
||||
runtime,
|
||||
http,
|
||||
started: Instant::now(),
|
||||
sessions: Mutex::new(HashMap::new()),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user