diff --git a/app/assets/javascripts/admin/addon/controllers/admin-config-trust-levels-settings.js b/app/assets/javascripts/admin/addon/controllers/admin-config-trust-levels-settings.js new file mode 100644 index 00000000000..b1a8fcc43b1 --- /dev/null +++ b/app/assets/javascripts/admin/addon/controllers/admin-config-trust-levels-settings.js @@ -0,0 +1,3 @@ +import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base"; + +export default class AdminConfigTrustLevelsSettingsController extends AdminAreaSettingsBaseController {} diff --git a/app/assets/javascripts/admin/addon/routes/admin-config-trust-levels.js b/app/assets/javascripts/admin/addon/routes/admin-config-trust-levels.js new file mode 100644 index 00000000000..40c7f9b6763 --- /dev/null +++ b/app/assets/javascripts/admin/addon/routes/admin-config-trust-levels.js @@ -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"); + } +} diff --git a/app/assets/javascripts/admin/addon/routes/admin-route-map.js b/app/assets/javascripts/admin/addon/routes/admin-route-map.js index c10775f5fca..92e709df86b 100644 --- a/app/assets/javascripts/admin/addon/routes/admin-route-map.js +++ b/app/assets/javascripts/admin/addon/routes/admin-route-map.js @@ -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"); }); diff --git a/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.hbs b/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.hbs new file mode 100644 index 00000000000..28cbb87cece --- /dev/null +++ b/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.hbs @@ -0,0 +1,22 @@ + + <:breadcrumbs> + + + + + +
+ +
\ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js index 2246c33de0e..32d896286a0 100644 --- a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js +++ b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js @@ -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", }, diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index e3ec31de863..a1690c8f40b 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -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 community’s 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?" diff --git a/config/routes.rb b/config/routes.rb index d92ecf6adee..13e1be5190d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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"