@use templates::base; @use template_utils::*; @use routes::user::UpdateUserForm; @use validator::ValidationErrors; @(ctx: BaseContext, form: UpdateUserForm, errors: ValidationErrors) @:base(ctx, "Edit your account", {}, {}, {

@i18n!(ctx.1, "Your Profile")

@input!(ctx.1, display_name (text), "Display name", form, errors.clone()) @input!(ctx.1, email (text), "Email", form, errors.clone()) @input!(ctx.1, summary (text), "Summary", form, errors)

@i18n!(ctx.1, "Danger zone")

@i18n!(ctx.1, "Be very careful, any action taken here can't be cancelled.") @if !ctx.2.clone().expect("Editing profile while not connected").is_admin {

} else {

@i18n!(ctx.1, "Sorry, but as an admin, you can't leave your instance.")

} })