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 // 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/>. // 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 jid::BareJid;
use keyring::Entry; use keyring::Entry;
use log::{error, info}; use log::{error, info};
use serde_derive::{Deserialize, Serialize}; use serde_derive::{Deserialize, Serialize};
use crate::types::LoginCredentials;
/// The configuration struct containing all the configuration options. /// The configuration struct containing all the configuration options.
#[derive(Default, Debug, Serialize, Deserialize)] #[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."); info!("No stored username or default nick found; will not try to log in.");
None None
} }
} }

View File

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

View File

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