Reworked IMAP setup flow. Implemented easy way to share protocol log on failure if possible.
This commit is contained in:
@@ -43,11 +43,5 @@ namespace Wino.Core.Domain.Entities
|
||||
|
||||
public string ProxyServer { get; set; }
|
||||
public string ProxyServerPort { get; set; }
|
||||
|
||||
[Obsolete("As 1.7.0")]
|
||||
public bool IncomingRequiresSSL { get; set; }
|
||||
|
||||
[Obsolete("As 1.7.0")]
|
||||
public bool OutgoingRequresSSL { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,11 @@ namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class ImapClientPoolException : Exception
|
||||
{
|
||||
public ImapClientPoolException(Exception innerException) : base(Translator.Exception_ImapClientPoolFailed, innerException)
|
||||
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
|
||||
{
|
||||
ProtocolLog = protocolLog;
|
||||
}
|
||||
|
||||
public string ProtocolLog { get; }
|
||||
}
|
||||
}
|
||||
|
||||
21
Wino.Core.Domain/Exceptions/ImapConnectionFailedPackage.cs
Normal file
21
Wino.Core.Domain/Exceptions/ImapConnectionFailedPackage.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class ImapConnectionFailedPackage
|
||||
{
|
||||
public ImapConnectionFailedPackage(Exception error, string protocolLog, AutoDiscoverySettings settings)
|
||||
{
|
||||
Error = error;
|
||||
ProtocolLog = protocolLog;
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
public AutoDiscoverySettings Settings { get; }
|
||||
public Exception Error { get; }
|
||||
public string ProtocolLog { get; }
|
||||
|
||||
public string GetErrorMessage() => Error.InnerException == null ? Error.Message : Error.InnerException.Message;
|
||||
}
|
||||
}
|
||||
@@ -15,5 +15,11 @@ namespace Wino.Core.Domain.Interfaces
|
||||
/// Displays preparing folders page.
|
||||
/// </summary>
|
||||
void ShowPreparingFolders();
|
||||
|
||||
/// <summary>
|
||||
/// Updates account properties for the welcome imap setup dialog and starts the setup.
|
||||
/// </summary>
|
||||
/// <param name="account">Account properties.</param>
|
||||
void StartImapConnectionSetup(MailAccount account);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Models.AutoDiscovery
|
||||
{
|
||||
public class AutoDiscoveryConnectionTestFailedPackage
|
||||
{
|
||||
public AutoDiscoveryConnectionTestFailedPackage(AutoDiscoverySettings settings, Exception error)
|
||||
{
|
||||
Settings = settings ?? throw new ArgumentNullException(nameof(settings));
|
||||
Error = error ?? throw new ArgumentNullException(nameof(error));
|
||||
}
|
||||
|
||||
public AutoDiscoveryConnectionTestFailedPackage(Exception error)
|
||||
{
|
||||
Error = error ?? throw new ArgumentNullException(nameof(error));
|
||||
}
|
||||
|
||||
public AutoDiscoverySettings Settings { get; set; }
|
||||
public Exception Error { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -30,9 +30,6 @@ namespace Wino.Core.Domain.Models.AutoDiscovery
|
||||
|
||||
if (imapSettings == null || smtpSettings == null) return null;
|
||||
|
||||
bool imapRequiresSSL = imapSettings.Secure == "SSL";
|
||||
bool smtpRequiresSSL = smtpSettings.Secure == "SSL";
|
||||
|
||||
string imapUrl = imapSettings.Address;
|
||||
string smtpUrl = smtpSettings.Address;
|
||||
|
||||
@@ -49,8 +46,8 @@ namespace Wino.Core.Domain.Models.AutoDiscovery
|
||||
Address = UserMinimalSettings.Email,
|
||||
IncomingServerPassword = UserMinimalSettings.Password,
|
||||
OutgoingServerPassword = UserMinimalSettings.Password,
|
||||
IncomingRequiresSSL = imapRequiresSSL,
|
||||
OutgoingRequresSSL = smtpRequiresSSL,
|
||||
IncomingAuthenticationMethod = Enums.ImapAuthenticationMethod.Auto,
|
||||
OutgoingAuthenticationMethod = Enums.ImapAuthenticationMethod.Auto,
|
||||
IncomingServer = imapUrl,
|
||||
OutgoingServer = smtpUrl,
|
||||
IncomingServerPort = imapPort.ToString(),
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Buttons_Close": "Close",
|
||||
"Buttons_Create": "Create",
|
||||
"Buttons_CreateAccount": "Create Account",
|
||||
"Buttons_Copy": "Copy",
|
||||
"Buttons_Delete": "Delete",
|
||||
"Buttons_Edit": "Edit",
|
||||
"Buttons_Discard": "Discard",
|
||||
@@ -39,6 +40,7 @@
|
||||
"Buttons_SaveConfiguration": "Save Configuration",
|
||||
"Buttons_Share": "Share",
|
||||
"Buttons_SignIn": "Sign In",
|
||||
"Buttons_TryAgain": "Try Again",
|
||||
"Buttons_Yes": "Yes",
|
||||
"Center": "Center",
|
||||
"ComingSoon": "Coming soon...",
|
||||
@@ -99,6 +101,7 @@
|
||||
"ElementTheme_Default": "Use system setting",
|
||||
"ElementTheme_Light": "Light mode",
|
||||
"Emoji": "Emoji",
|
||||
"Exception_ImapAutoDiscoveryFailed": "Couldn't find mailbox settings.",
|
||||
"Exception_ImapClientPoolFailed": "IMAP Client Pool failed.",
|
||||
"Exception_AuthenticationCanceled": "Authentication canceled",
|
||||
"Exception_CustomThemeExists": "This theme already exists.",
|
||||
@@ -169,6 +172,8 @@
|
||||
"IMAPSetupDialog_UseSameConfig": "Use the same username and password for sending email",
|
||||
"IMAPSetupDialog_Username": "Username",
|
||||
"IMAPSetupDialog_UsernamePlaceholder": "johndoe, johndoe@fabrikam.com, domain/johndoe",
|
||||
"IMAPSetupDialog_ConnectionFailedTitle": "Connection Failed",
|
||||
"IMAPSetupDialog_ConnectionFailedMessage": "IMAP connection failed.",
|
||||
"ImageRenderingDisabled": "Image rendering is disabled for this message.",
|
||||
"InfoBarAction_Enable": "Enable",
|
||||
"InfoBarMessage_SynchronizationDisabledFolder": "This folder is disabled for synchronization.",
|
||||
@@ -323,6 +328,7 @@
|
||||
"ProviderDetail_Gmail_Description": "Google Account",
|
||||
"ProviderDetail_IMAP_Description": "Custom IMAP/SMTP server",
|
||||
"ProviderDetail_IMAP_Title": "IMAP Server",
|
||||
"ProtocolLogAvailable_Message": "Protocol logs are available for diagnostics.",
|
||||
"Results": "Results",
|
||||
"Right": "Right",
|
||||
"SynchronizationFolderReport_Success": "up to date",
|
||||
|
||||
564
Wino.Core.Domain/Translator.Designer.cs
generated
564
Wino.Core.Domain/Translator.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user