Fix argument name to fit in the convention

This commit is contained in:
GrO2Bl 2024-06-12 20:39:29 +03:30
parent d950a34b6b
commit 0dd6377967

View file

@ -1,23 +1,23 @@
@use crate::template_utils::*; @use crate::template_utils::*;
@use crate::routes::*; @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) { @if ctx.2.clone().map(|u| u.is_admin()).unwrap_or(false) {
<h1>@i18n!(ctx.1, title)</h1> <h1>@i18n!(ctx.1, title)</h1>
@tabs(&[ @tabs(&[
(&uri!(instance::admin).to_string(), i18n!(ctx.1, "Configuration"), if selectedTab == 1 {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 selectedTab == 2 {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 selectedTab == 3 {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 selectedTab == 4 {true} else {false}) (&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), if selected_tab == 4 {true} else {false})
]) ])
} else { } else {
<h1>@i18n!(ctx.1, "Moderation")</h1> <h1>@i18n!(ctx.1, "Moderation")</h1>
@tabs(&[ @tabs(&[
(&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), if selectedTab == 1 {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 selectedTab == 2 {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 selectedTab == 3 {true} else {false}) (&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), if selected_tab == 3 {true} else {false})
]) ])
} }