mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 10:02:45 +08:00
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:
parent
caa8ff3d16
commit
21470e4afd
|
@ -0,0 +1,3 @@
|
||||||
|
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||||
|
|
||||||
|
export default class AdminConfigTrustLevelsSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
|
@ -231,6 +231,11 @@ export default function () {
|
||||||
path: "/",
|
path: "/",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.route("trustLevels", { path: "/trust-levels" }, function () {
|
||||||
|
this.route("settings", {
|
||||||
|
path: "/",
|
||||||
|
});
|
||||||
|
});
|
||||||
this.route("lookAndFeel", { path: "/look-and-feel" }, function () {
|
this.route("lookAndFeel", { path: "/look-and-feel" }, function () {
|
||||||
this.route("themes");
|
this.route("themes");
|
||||||
});
|
});
|
||||||
|
|
|
@ -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>
|
|
@ -60,9 +60,7 @@ export const ADMIN_NAV_MAP = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "admin_trust_levels",
|
name: "admin_trust_levels",
|
||||||
route: "adminSiteSettingsCategory",
|
route: "adminConfig.trustLevels.settings",
|
||||||
routeModels: ["trust"],
|
|
||||||
query: { filter: "" },
|
|
||||||
label: "admin.community.sidebar_link.trust_levels",
|
label: "admin.community.sidebar_link.trust_levels",
|
||||||
icon: "user-shield",
|
icon: "user-shield",
|
||||||
},
|
},
|
||||||
|
|
|
@ -5146,6 +5146,9 @@ en:
|
||||||
notifications:
|
notifications:
|
||||||
title: "Notifications"
|
title: "Notifications"
|
||||||
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
|
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 community’s progression system, which automatically promotes users to higher trust levels as they demonstrate consistent, positive engagement with your forum."
|
||||||
|
|
||||||
new_features:
|
new_features:
|
||||||
title: "What's new?"
|
title: "What's new?"
|
||||||
|
|
|
@ -397,6 +397,7 @@ Discourse::Application.routes.draw do
|
||||||
get "login-and-authentication" => "site_settings#index"
|
get "login-and-authentication" => "site_settings#index"
|
||||||
get "logo" => "site_settings#index"
|
get "logo" => "site_settings#index"
|
||||||
get "notifications" => "site_settings#index"
|
get "notifications" => "site_settings#index"
|
||||||
|
get "trust-levels" => "site_settings#index"
|
||||||
|
|
||||||
resources :flags, only: %i[index new create update destroy] do
|
resources :flags, only: %i[index new create update destroy] do
|
||||||
put "toggle"
|
put "toggle"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user