@use plume_models::blocklisted_emails::BlocklistedEmail; @use crate::templates::base; @use crate::template_utils::*; @use crate::routes::*; @(ctx:BaseContext, emails: Vec, page:i32, n_pages:i32) @:base(ctx, i18n!(ctx.1, "Blocklisted Emails"), {}, {}, {

@i18n!(ctx.1,"Blocklisted Emails")

@tabs(&[ (&uri!(instance::admin).to_string(), i18n!(ctx.1, "Configuration"), false), (&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), false), (&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), false), (&uri!(instance::admin_email_blocklist:page=_).to_string(), i18n!(ctx.1, "Email blocklist"), true), ])
@(Input::new("email_address", i18n!(ctx.1, "Email address")) .details(i18n!(ctx.1, "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com")) .set_prop("minlength", 1) .html(ctx.1)) @(Input::new("note", i18n!(ctx.1, "Note")).optional().html(ctx.1)) @(Input::new("notification_text", i18n!(ctx.1, "Blocklisting notification")) .optional() .details(i18n!(ctx.1, "The message to be shown when the user attempts to create an account with this email address")).html(ctx.1))
@if emails.is_empty() { } else {

@i18n!(ctx.1, "There are no blocked emails on your instance")

}
@for email in emails {

@i18n!(ctx.1, "Email address:") @email.email_address

@i18n!(ctx.1, "Blocklisted for:") @email.note

@if email.notify_user { @i18n!(ctx.1, "Will notify them on account creation with this message:") @email.notification_text } else { @i18n!(ctx.1, "The user will be silently prevented from making an account") }

}
@paginate(ctx.1, page, n_pages) })