Added mailboxes as local data sources (#1022)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-04 12:26:26 +02:00
1 parent 93be539e50
commit c4400c0ff6
343 files changed
+26051 -3122

No files matched your search

@@ -10,6 +10,10 @@ public sealed class DataSourceValidation
{
public const int MAX_NAME_LENGTH = 40;
public const int MIN_ATTACHMENT_SIZE_MEGABYTES = 1;
public const int MAX_ATTACHMENT_SIZE_MEGABYTES = 2048;
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(DataSourceValidation).Namespace, nameof(DataSourceValidation));
public static bool IsNameValid(string name) => !string.IsNullOrWhiteSpace(name) && name.Length <= MAX_NAME_LENGTH && !name.Any(char.IsControl);
@@ -178,6 +182,64 @@ public sealed class DataSourceValidation
return this.ValidateSelectedEmbeddingProviderAccess();
}
public string? ValidateMailboxConfidenceLevel(ConfidenceLevel confidenceLevel)
{
if(confidenceLevel is ConfidenceLevel.NONE)
return TB("Please select a required provider confidence level.");
if(!confidenceLevel.IsAllowedMailboxConfidence())
return string.Format(TB("A mailbox requires a provider confidence level from '{0}' to '{1}'."), ConfidenceLevel.VERY_LOW.GetName(), ConfidenceLevel.HIGH.GetName());
return this.ValidateSelectedEmbeddingProviderAccess();
}
public static string? ValidateMailboxHost(string host)
{
if(string.IsNullOrWhiteSpace(host))
return TB("Please enter the host of the IMAP server, e.g., imap.example.org.");
if(Uri.CheckHostName(host.Trim()) is not (UriHostNameType.Dns or UriHostNameType.IPv4 or UriHostNameType.IPv6))
return TB("Please enter the host alone, without a protocol, a port, or a path, e.g., imap.example.org.");
return null;
}
public static string? ValidateMailboxTransportSecurity(MailboxTransportSecurity transportSecurity)
{
if(transportSecurity is MailboxTransportSecurity.UNKNOWN)
return TB("Please select how the connection to the server is encrypted.");
return null;
}
public static string? ValidateMailboxUsername(string username)
{
if(string.IsNullOrWhiteSpace(username))
return TB("The username must not be empty.");
return null;
}
public string? ValidateMailboxPassword(string password)
{
var secretStorageIssue = this.GetSecretStorageIssue();
if(!string.IsNullOrWhiteSpace(secretStorageIssue))
return secretStorageIssue;
if(string.IsNullOrEmpty(password))
return TB("Please enter your password.");
return null;
}
public static string? ValidateMailboxMaxAttachmentSize(int megabytes)
{
if(megabytes is < MIN_ATTACHMENT_SIZE_MEGABYTES or > MAX_ATTACHMENT_SIZE_MEGABYTES)
return string.Format(TB("The size must be between {0} and {1} MB."), MIN_ATTACHMENT_SIZE_MEGABYTES, MAX_ATTACHMENT_SIZE_MEGABYTES);
return null;
}
public string? ValidateUserAcknowledgedCloudEmbedding(bool value)
{
if(this.GetSelectedCloudEmbedding() && !value)