UI Optimizations, Basic Multi Panel system

This commit is contained in:
Alex Emmet 2025-10-09 19:50:46 +00:00
commit beea361971
14 changed files with 608 additions and 618 deletions

View file

@ -1,4 +1,4 @@
use crate::auth::auth_connector::AuthConnector;
use crate::auth::auth_connector;
use crate::users::user_profile::UserProfile;
use crate::users::user_profile_full::UserProfileFull;
use crate::util::config_util::CONFIG;
@ -29,7 +29,7 @@ static UNIQUE: Lazy<Mutex<bool>> = Lazy::new(|| Mutex::new(false));
impl UserManager {
pub async fn create_user(username: &str) -> Option<UserProfileFull> {
let user_id = AuthConnector::get_register().await.unwrap();
let user_id = auth_connector::get_register().await.unwrap();
let mut buf = [0u8; 56];
let mut rng = OsRng;
rng.fill_bytes(&mut buf);
@ -63,7 +63,7 @@ impl UserManager {
private_key: general_purpose::STANDARD.encode(&private_key.as_bytes()),
};
AuthConnector::complete_register(&up, &CONFIG.lock().unwrap().get_iota_id().to_string())
auth_connector::complete_register(&up, &CONFIG.lock().unwrap().get_iota_id().to_string())
.await;
save_file(
"",

View file

@ -1,4 +1,4 @@
use crate::auth::auth_connector::AuthConnector;
use crate::auth::auth_connector;
use crate::gui::log_panel::log_message;
use crate::users::user_manager::UserManager;
use base64::{Engine as _, engine::general_purpose};
@ -79,7 +79,7 @@ impl UserProfile {
|| j.has_key("move")
|| j.has_key("moving")
{
if AuthConnector::migrate_user(&mut up).await {
if auth_connector::migrate_user(&mut up).await {
log_message(format!("[INFO] Migration triggered for {}", up.username));
UserManager::set_unique(true);
}