From 35c1453863bc99550f18f6a4dcf77eb47a31c039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Sun, 4 Feb 2024 11:36:11 +0100 Subject: [PATCH] added wizard warning about google passwords --- CHANGELOG.md | 5 +++++ Cargo.lock | 2 +- src/account/wizard.rs | 11 ++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e10e73..c8b62bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Added wizard warning about google passwords. [sourcehut#41] + ### Changed - Changed `envelope.watch.{event}.{hook}`: hooks can now be cumulated. For example it is possible to send a system notification and execute a shell command when receiving a new envelope: @@ -900,6 +904,7 @@ Few major concepts changed: [#419]: https://github.com/soywod/himalaya/issues/419 [#430]: https://github.com/soywod/himalaya/issues/430 +[sourcehut#41]: https://todo.sr.ht/~soywod/pimalaya/41 [sourcehut#43]: https://todo.sr.ht/~soywod/pimalaya/43 [sourcehut#54]: https://todo.sr.ht/~soywod/pimalaya/54 [sourcehut#59]: https://todo.sr.ht/~soywod/pimalaya/59 diff --git a/Cargo.lock b/Cargo.lock index 95245bc..60ee8c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1217,7 +1217,7 @@ dependencies = [ [[package]] name = "email-lib" version = "0.21.0" -source = "git+https://git.sr.ht/~soywod/pimalaya#f9a55e764282f1986201e226aacedf13f2e0bc80" +source = "git+https://git.sr.ht/~soywod/pimalaya#ca42096c5537cf15becbb12bf0935381a1ea2908" dependencies = [ "advisory-lock", "anyhow", diff --git a/src/account/wizard.rs b/src/account/wizard.rs index f0fffb6..bace12d 100644 --- a/src/account/wizard.rs +++ b/src/account/wizard.rs @@ -13,9 +13,9 @@ use email_address::EmailAddress; use crate::backend::{self, config::BackendConfig, BackendKind}; #[cfg(feature = "message-send")] use crate::message::config::{MessageConfig, MessageSendConfig}; -use crate::ui::THEME; #[cfg(feature = "account-sync")] use crate::wizard_prompt; +use crate::{ui::THEME, wizard_warn}; use super::TomlAccountConfig; @@ -63,6 +63,15 @@ pub(crate) async fn configure() -> Result> { let autoconfig = autoconfig.await?; let autoconfig = autoconfig.as_ref(); + if let Some(config) = autoconfig { + if config.is_gmail() { + println!(); + wizard_warn!("Warning: Google passwords cannot be used directly, see:"); + wizard_warn!("https://pimalaya.org/himalaya/cli/latest/configuration/gmail.html"); + println!(); + } + } + match backend::wizard::configure(&account_name, email, autoconfig).await? { #[cfg(feature = "imap")] Some(BackendConfig::Imap(imap_config)) => {