diff --git a/app/assets/javascripts/admin/addon/controllers/admin-config-rate-limits-settings.js b/app/assets/javascripts/admin/addon/controllers/admin-config-rate-limits-settings.js new file mode 100644 index 00000000000..6cd05a49c54 --- /dev/null +++ b/app/assets/javascripts/admin/addon/controllers/admin-config-rate-limits-settings.js @@ -0,0 +1,3 @@ +import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base"; + +export default class AdminConfigRateLimitsSettingsController extends AdminAreaSettingsBaseController {} diff --git a/app/assets/javascripts/admin/addon/routes/admin-config-rate-limits.js b/app/assets/javascripts/admin/addon/routes/admin-config-rate-limits.js new file mode 100644 index 00000000000..c13d23956bb --- /dev/null +++ b/app/assets/javascripts/admin/addon/routes/admin-config-rate-limits.js @@ -0,0 +1,8 @@ +import DiscourseRoute from "discourse/routes/discourse"; +import { i18n } from "discourse-i18n"; + +export default class AdminConfigRateLimitsRoute extends DiscourseRoute { + titleToken() { + return i18n("admin.advanced.sidebar_link.rate_limits"); + } +} 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 41780eac78b..43d663d0995 100644 --- a/app/assets/javascripts/admin/addon/routes/admin-route-map.js +++ b/app/assets/javascripts/admin/addon/routes/admin-route-map.js @@ -303,6 +303,9 @@ export default function () { this.route("navigation", function () { this.route("settings", { path: "/" }); }); + this.route("rate-limits", function () { + this.route("settings", { path: "/" }); + }); this.route("security", function () { this.route("settings", { path: "/" }); }); diff --git a/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs new file mode 100644 index 00000000000..fbda2c2731b --- /dev/null +++ b/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs @@ -0,0 +1,29 @@ +import RouteTemplate from "ember-route-template"; +import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item"; +import DPageHeader from "discourse/components/d-page-header"; +import { i18n } from "discourse-i18n"; +import AdminAreaSettings from "admin/components/admin-area-settings"; + +export default RouteTemplate(); 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 0ab8fd8a543..21df96593d0 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 @@ -238,9 +238,7 @@ export const ADMIN_NAV_MAP = [ }, { name: "admin_rate_limits", - route: "adminSiteSettingsCategory", - routeModels: ["rate_limits"], - query: { filter: "" }, + route: "adminConfig.rate-limits.settings", label: "admin.advanced.sidebar_link.rate_limits", icon: "rocket", }, diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index fb15c901247..daacff08d52 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -5158,6 +5158,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" + rate_limits: + title: "Rate limits" + header_description: "Configure how often users can perform certain actions, such as creating topics, sending messages, and posting replies" search: title: "Search" header_description: "Configure search settings including logging and tokenization for Chinese and Japanese languages" diff --git a/config/routes.rb b/config/routes.rb index 7564b834a50..8cdac809cb5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -400,6 +400,7 @@ Discourse::Application.routes.draw do get "logo" => "site_settings#index" get "navigation" => "site_settings#index" get "notifications" => "site_settings#index" + get "rate-limits" => "site_settings#index" get "search" => "site_settings#index" get "security" => "site_settings#index" get "spam" => "site_settings#index"