forked from Plume-org/Plume
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request 'Fix moderation issues #1156' (#1157) from gro2bl/…
…Plume:fix_moderation_issues into main Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/1157 Reviewed-by: trinity-1686a <trinity-1686a@[email protected]>
- Loading branch information
Showing
9 changed files
with
53 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@use crate::template_utils::*; | ||
@use crate::routes::*; | ||
|
||
@(ctx: BaseContext, title: &str, selected_tab: u8) | ||
|
||
<h1>@i18n!(ctx.1, title)</h1> | ||
|
||
@if ctx.2.clone().map(|u| u.is_admin()).unwrap_or(false) { | ||
@tabs(&[ | ||
(&uri!(instance::admin).to_string(), i18n!(ctx.1, "Configuration"), selected_tab == 1), | ||
(&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), selected_tab == 2), | ||
(&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), selected_tab == 3), | ||
(&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), selected_tab == 4) | ||
]) | ||
} else { | ||
@tabs(&[ | ||
(&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), selected_tab == 2), | ||
(&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), selected_tab == 3), | ||
(&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), selected_tab == 4) | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
@use crate::templates::base; | ||
@use crate::templates::{base, instance::admin_header}; | ||
@use crate::template_utils::*; | ||
@use crate::routes::*; | ||
|
||
@(ctx: BaseContext) | ||
|
||
@:base(ctx, i18n!(ctx.1, "Moderation"), {}, {}, { | ||
<h1>@i18n!(ctx.1, "Moderation")</h1> | ||
|
||
@tabs(&[ | ||
(&uri!(instance::admin).to_string(), i18n!(ctx.1, "Home"), true), | ||
(&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), false), | ||
(&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), false), | ||
]) | ||
@:admin_header(ctx, "Moderation", 0) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters