Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Sep 4, 2024
1 parent 0e2fc0e commit a62e8ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/login_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ impl ConfiguredLoginParam {
// Old "Automatic" configuration defaults to no strict TLS.
// User should upgrade configuration.
self.provider.is_none()
},
}
ConfiguredCertificateChecks::Automatic | ConfiguredCertificateChecks::Strict => false,
ConfiguredCertificateChecks::AcceptInvalidCertificates
| ConfiguredCertificateChecks::AcceptInvalidCertificates2 => true,
Expand Down
14 changes: 10 additions & 4 deletions src/scheduler/connectivity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use anyhow::Result;
use humansize::{format_size, BINARY};
use tokio::sync::Mutex;

use crate::login_param::ConfiguredLoginParam;
use crate::events::EventType;
use crate::imap::{scan_folders::get_watched_folder_configs, FolderMeaning};
use crate::login_param::ConfiguredLoginParam;
use crate::quota::{QUOTA_ERROR_THRESHOLD_PERCENTAGE, QUOTA_WARN_THRESHOLD_PERCENTAGE};
use crate::stock_str;
use crate::{context::Context, log::LogExt};
Expand Down Expand Up @@ -515,13 +515,19 @@ impl Context {
ret += "<li>";
if configured_login_param.strict_tls() {
// GREEN: strict TLS checks are enabled.
ret += &format!("<span class=\"green dot\"></span> <b>TLS Certificate Checks:</b> enabled");
ret += &format!(
"<span class=\"green dot\"></span> <b>TLS Certificate Checks:</b> enabled"
);
} else if configured_login_param.strict_tls_manually_disabled() {
// RED: TLS checks are manually disabled.
ret += &format!("<span class=\"red dot\"></span> <b>TLS Certificate Checks:</b> disabled");
ret += &format!(
"<span class=\"red dot\"></span> <b>TLS Certificate Checks:</b> disabled"
);
} else {
// YELLOW: TLS checks are automatically disabled.
ret += &format!("<span class=\"yellow dot\"></span> <b>TLS Certificate Checks:</b> disabled");
ret += &format!(
"<span class=\"yellow dot\"></span> <b>TLS Certificate Checks:</b> disabled"
);
}
ret += "</li></ul>";
}
Expand Down

0 comments on commit a62e8ed

Please sign in to comment.