UX: Admin setting page consistency - Trust levels (#30571)

Followup c2282439b3

Make the trust levels config page reached from the sidebar
use our consistent site setting page rules.
This commit is contained in:
Martin Brennan 2025-01-06 15:53:18 +10:00 committed by GitHub
parent caa8ff3d16
commit 21470e4afd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 43 additions and 3 deletions

View File

@ -0,0 +1,3 @@
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
export default class AdminConfigTrustLevelsSettingsController extends AdminAreaSettingsBaseController {}

View File

@ -0,0 +1,8 @@
import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class AdminConfigTrustLevelsRoute extends DiscourseRoute {
titleToken() {
return i18n("admin.community.sidebar_link.trust_levels");
}
}

View File

@ -231,6 +231,11 @@ export default function () {
path: "/",
});
});
this.route("trustLevels", { path: "/trust-levels" }, function () {
this.route("settings", {
path: "/",
});
});
this.route("lookAndFeel", { path: "/look-and-feel" }, function () {
this.route("themes");
});

View File

@ -0,0 +1,22 @@
<DPageHeader
@titleLabel={{i18n "admin.config.trust_levels.title"}}
@descriptionLabel={{i18n "admin.config.trust_levels.header_description"}}
@learnMoreUrl="https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/"
>
<:breadcrumbs>
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
<DBreadcrumbsItem
@path="/admin/config/trust-levels"
@label={{i18n "admin.config.trust_levels.title"}}
/>
</:breadcrumbs>
</DPageHeader>
<div class="admin-config-page__main-area">
<AdminAreaSettings
@categories="trust"
@path="/admin/config/trust-levels"
@filter={{this.filter}}
@adminSettingsFilterChangedCallback={{this.adminSettingsFilterChangedCallback}}
/>
</div>

View File

@ -60,9 +60,7 @@ export const ADMIN_NAV_MAP = [
},
{
name: "admin_trust_levels",
route: "adminSiteSettingsCategory",
routeModels: ["trust"],
query: { filter: "" },
route: "adminConfig.trustLevels.settings",
label: "admin.community.sidebar_link.trust_levels",
icon: "user-shield",
},

View File

@ -5146,6 +5146,9 @@ en:
notifications:
title: "Notifications"
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
trust_levels:
title: "Trust levels"
header_description: "Trust level settings allow you to fine-tune the requirements and notifications for your communitys progression system, which automatically promotes users to higher trust levels as they demonstrate consistent, positive engagement with your forum."
new_features:
title: "What's new?"

View File

@ -397,6 +397,7 @@ Discourse::Application.routes.draw do
get "login-and-authentication" => "site_settings#index"
get "logo" => "site_settings#index"
get "notifications" => "site_settings#index"
get "trust-levels" => "site_settings#index"
resources :flags, only: %i[index new create update destroy] do
put "toggle"