From 0dd6377967038cc4aebb893acc8271be12d83b7b Mon Sep 17 00:00:00 2001 From: GrO2Bl Date: Wed, 12 Jun 2024 20:39:29 +0330 Subject: [PATCH] Fix argument name to fit in the convention --- templates/instance/admin_header.rs.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/instance/admin_header.rs.html b/templates/instance/admin_header.rs.html index 21e0d070..299ef565 100644 --- a/templates/instance/admin_header.rs.html +++ b/templates/instance/admin_header.rs.html @@ -1,23 +1,23 @@ @use crate::template_utils::*; @use crate::routes::*; -@(ctx: BaseContext, title: &str, selectedTab: u8) +@(ctx: BaseContext, title: &str, selected_tab: u8) @if ctx.2.clone().map(|u| u.is_admin()).unwrap_or(false) {

@i18n!(ctx.1, title)

@tabs(&[ - (&uri!(instance::admin).to_string(), i18n!(ctx.1, "Configuration"), if selectedTab == 1 {true} else {false}), - (&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), if selectedTab == 2 {true} else {false}), - (&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), if selectedTab == 3 {true} else {false}), - (&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), if selectedTab == 4 {true} else {false}) + (&uri!(instance::admin).to_string(), i18n!(ctx.1, "Configuration"), if selected_tab == 1 {true} else {false}), + (&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), if selected_tab == 2 {true} else {false}), + (&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), if selected_tab == 3 {true} else {false}), + (&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), if selected_tab == 4 {true} else {false}) ]) } else {

@i18n!(ctx.1, "Moderation")

@tabs(&[ - (&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), if selectedTab == 1 {true} else {false}), - (&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), if selectedTab == 2 {true} else {false}), - (&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), if selectedTab == 3 {true} else {false}) + (&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), if selected_tab == 1 {true} else {false}), + (&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), if selected_tab == 2 {true} else {false}), + (&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), if selected_tab == 3 {true} else {false}) ]) }