From c65fc6d85f6530dddd6836e523e885ad6a8275db Mon Sep 17 00:00:00 2001 From: mdecimus Date: Tue, 23 Apr 2024 19:28:19 +0200 Subject: [PATCH] Missing space in accounts column of Domain list (closes #5) --- src/components/form/stacked_badge.rs | 2 +- src/pages/config/schema/smtp.rs | 31 +++++++++++++++++----------- src/pages/directory/domains/list.rs | 3 +-- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/components/form/stacked_badge.rs b/src/components/form/stacked_badge.rs index 961445f..36e3ad4 100644 --- a/src/components/form/stacked_badge.rs +++ b/src/components/form/stacked_badge.rs @@ -130,7 +130,7 @@ pub fn StackedBadge( } > - + + "+ " {add_button_text} diff --git a/src/pages/config/schema/smtp.rs b/src/pages/config/schema/smtp.rs index 6804bb0..29fd11a 100644 --- a/src/pages/config/schema/smtp.rs +++ b/src/pages/config/schema/smtp.rs @@ -1068,18 +1068,6 @@ impl Builder { .build() // AUTH stage .new_schema("smtp-in-auth") - .new_field("session.auth.directory") - .label("Directory") - .help("Specifies the directory to use for authentication") - .default(Expression::new([("local_port != 25", "'*'")], "false")) - .typ(Type::Expression) - .input_check( - [], - [ - Validator::Required, - Validator::IsValidExpression(has_ehlo_hars), - ], - ) .new_field("session.auth.require") .label("Require Authentication") .help(concat!( @@ -1093,6 +1081,25 @@ impl Builder { "e-mail addresses must match the sender of the email message" )) .default("true") + .typ(Type::Expression) + .input_check( + [], + [ + Validator::Required, + Validator::IsValidExpression(has_sender_vars), + ], + ) + .new_field("session.auth.directory") + .label("Directory") + .help("Specifies the directory to use for authentication") + .default(Expression::new([("local_port != 25", "'*'")], "false")) + .input_check( + [], + [ + Validator::Required, + Validator::IsValidExpression(has_ehlo_hars), + ], + ) .new_field("session.auth.errors.total") .label("Max Errors") .help(concat!( diff --git a/src/pages/directory/domains/list.rs b/src/pages/directory/domains/list.rs index 5056e11..6a5fb35 100644 --- a/src/pages/directory/domains/list.rs +++ b/src/pages/directory/domains/list.rs @@ -335,8 +335,7 @@ fn DomainItem(domain: Domain) -> impl IntoView { class="inline-flex items-center gap-x-1 text-sm text-blue-600 decoration-2 hover:underline font-medium dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href=action_url > - {domain.addresses} - accounts + {maybe_plural(domain.addresses as usize, "account", "accounts")}