Reformatting.

This commit is contained in:
Werner Kroneman 2023-12-10 18:12:18 +01:00
parent f4e8d5fa3b
commit 3e86a4706f
3 changed files with 21 additions and 24 deletions

View File

@ -14,12 +14,12 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::passwords::{Password, try_retrieve_password_from_keyring};
use crate::passwords::{try_retrieve_password_from_keyring, Password};
use crate::types::LoginCredentials;
use jid::BareJid;
use keyring::Entry;
use log::{error, info};
use serde_derive::{Deserialize, Serialize};
use crate::types::LoginCredentials;
/// The configuration struct containing all the configuration options.
#[derive(Default, Debug, Serialize, Deserialize)]
@ -89,4 +89,4 @@ pub fn try_retrieve_credentials(config: &Configuration) -> Option<LoginCredentia
info!("No stored username or default nick found; will not try to log in.");
None
}
}
}

View File

@ -18,12 +18,12 @@ use dioxus::core::{Element, Scope};
use dioxus::hooks::use_state;
use dioxus::prelude::*;
use std::fmt::Debug;
use std::str::FromStr;
use jid::BareJid;
use log::error;
use crate::passwords::Password;
use crate::types::LoginCredentials;
use jid::BareJid;
use log::error;
use std::fmt::Debug;
use std::str::FromStr;
#[derive(Debug, Clone, PartialEq)]
pub enum LoginStatus {

View File

@ -14,29 +14,26 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::passwords::Password;
use crate::types::LoginCredentials;
use crate::widgets::login_screen::LoginAttempt;
use crate::widgets::login_screen::{LoginScreen, LoginStatus};
use crate::widgets::no_room_open::NoRoomPlaceholder;
use crate::widgets::room_view::RoomView;
use crate::widgets::sidebar::SideBar;
use crate::xmpp_interface::NetworkCommand;
use crate::{
configuration::store_login_details,
configuration::{load_config, try_retrieve_credentials},
widgets::{
login_screen::validate_login_attempt,
login_screen::LoginAttempt,
login_screen::{LoginScreen, LoginStatus},
no_room_open::NoRoomPlaceholder,
room_view::RoomView,
sidebar::SideBar,
},
xmpp_interface,
xmpp_interface::NetworkCommand,
};
use dioxus::core::{Element, Scope};
use crate::widgets::login_screen::validate_login_attempt;
use dioxus::prelude::*;
use futures_util::StreamExt;
use jid::BareJid;
use log::{error, info};
use std::collections::HashMap;
use crate::configuration::{load_config, Configuration, try_retrieve_credentials};
use crate::xmpp_interface;
use crate::configuration::store_login_details;
use crate::passwords::try_retrieve_password_from_keyring;
use std::str::FromStr;
use std::string::String;
pub mod login_screen;