mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-01 06:55:13 +00:00
fix typos
This commit is contained in:
parent
2e0ec913cf
commit
3e3f111d3b
|
@ -20,6 +20,15 @@ sync.enable = true
|
||||||
# Override the default Maildir path for synchronization.
|
# Override the default Maildir path for synchronization.
|
||||||
sync.dir = "/tmp/himalaya-sync-example"
|
sync.dir = "/tmp/himalaya-sync-example"
|
||||||
|
|
||||||
|
# Define main folder aliases
|
||||||
|
folder.alias.inbox = "INBOX"
|
||||||
|
folder.alias.sent = "Sent"
|
||||||
|
folder.alias.drafts = "Drafts"
|
||||||
|
folder.alias.trash = "Trash"
|
||||||
|
|
||||||
|
# Also define custom folder aliases
|
||||||
|
folder.alias.prev-year = "Archives/2023"
|
||||||
|
|
||||||
# Default backend used for all the features like adding folders,
|
# Default backend used for all the features like adding folders,
|
||||||
# listing envelopes or copying messages.
|
# listing envelopes or copying messages.
|
||||||
backend = "imap"
|
backend = "imap"
|
||||||
|
|
|
@ -201,7 +201,7 @@ impl TomlConfig {
|
||||||
downloads_dir: config.downloads_dir,
|
downloads_dir: config.downloads_dir,
|
||||||
|
|
||||||
folder: config.folder.map(|c| FolderConfig {
|
folder: config.folder.map(|c| FolderConfig {
|
||||||
aliases: c.remote.aliases,
|
aliases: c.alias,
|
||||||
list: c.list.map(|c| c.remote),
|
list: c.list.map(|c| c.remote),
|
||||||
}),
|
}),
|
||||||
envelope: config.envelope.map(|c| EnvelopeConfig {
|
envelope: config.envelope.map(|c| EnvelopeConfig {
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::collections::HashSet;
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
use crate::backend::BackendKind;
|
use crate::backend::BackendKind;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Eq, PartialEq, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Default, Eq, PartialEq, Deserialize, Serialize)]
|
||||||
pub struct FolderConfig {
|
pub struct FolderConfig {
|
||||||
|
#[serde(alias = "aliases")]
|
||||||
|
pub alias: Option<HashMap<String, String>>,
|
||||||
|
|
||||||
pub add: Option<FolderAddConfig>,
|
pub add: Option<FolderAddConfig>,
|
||||||
pub list: Option<FolderListConfig>,
|
pub list: Option<FolderListConfig>,
|
||||||
pub expunge: Option<FolderExpungeConfig>,
|
pub expunge: Option<FolderExpungeConfig>,
|
||||||
pub purge: Option<FolderPurgeConfig>,
|
pub purge: Option<FolderPurgeConfig>,
|
||||||
pub delete: Option<FolderDeleteConfig>,
|
pub delete: Option<FolderDeleteConfig>,
|
||||||
|
|
||||||
#[serde(flatten)]
|
|
||||||
pub remote: email::folder::config::FolderConfig,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FolderConfig {
|
impl FolderConfig {
|
||||||
|
|
|
@ -51,13 +51,19 @@ pub(crate) async fn configure(account_name: &str, email: &str) -> Result<Backend
|
||||||
let default_port = match protocol {
|
let default_port = match protocol {
|
||||||
Some(idx) if PROTOCOLS[idx] == SSL_TLS => {
|
Some(idx) if PROTOCOLS[idx] == SSL_TLS => {
|
||||||
config.ssl = Some(true);
|
config.ssl = Some(true);
|
||||||
|
config.starttls = Some(false);
|
||||||
993
|
993
|
||||||
}
|
}
|
||||||
Some(idx) if PROTOCOLS[idx] == STARTTLS => {
|
Some(idx) if PROTOCOLS[idx] == STARTTLS => {
|
||||||
|
config.ssl = Some(false);
|
||||||
config.starttls = Some(true);
|
config.starttls = Some(true);
|
||||||
143
|
143
|
||||||
}
|
}
|
||||||
_ => 143,
|
_ => {
|
||||||
|
config.ssl = Some(false);
|
||||||
|
config.starttls = Some(false);
|
||||||
|
143
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
config.port = Input::with_theme(&*THEME)
|
config.port = Input::with_theme(&*THEME)
|
||||||
|
|
|
@ -51,13 +51,19 @@ pub(crate) async fn configure(account_name: &str, email: &str) -> Result<Backend
|
||||||
let default_port = match protocol {
|
let default_port = match protocol {
|
||||||
Some(idx) if PROTOCOLS[idx] == SSL_TLS => {
|
Some(idx) if PROTOCOLS[idx] == SSL_TLS => {
|
||||||
config.ssl = Some(true);
|
config.ssl = Some(true);
|
||||||
|
config.starttls = Some(false);
|
||||||
465
|
465
|
||||||
}
|
}
|
||||||
Some(idx) if PROTOCOLS[idx] == STARTTLS => {
|
Some(idx) if PROTOCOLS[idx] == STARTTLS => {
|
||||||
|
config.ssl = Some(false);
|
||||||
config.starttls = Some(true);
|
config.starttls = Some(true);
|
||||||
587
|
587
|
||||||
}
|
}
|
||||||
_ => 25,
|
_ => {
|
||||||
|
config.ssl = Some(false);
|
||||||
|
config.starttls = Some(false);
|
||||||
|
25
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
config.port = Input::with_theme(&*THEME)
|
config.port = Input::with_theme(&*THEME)
|
||||||
|
|
Loading…
Reference in a new issue