mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 05:42:41 +08:00
UX: Admin setting page consistency - Rate Limits (#30609)
Create a basic config page that only contains rate limiting-related settings, to replace the "rate_limits" category view linked to from "Rate limits" in the admin sidebar.
This commit is contained in:
parent
dc36bed7d3
commit
18a8ca38ff
|
@ -0,0 +1,3 @@
|
||||||
|
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||||
|
|
||||||
|
export default class AdminConfigRateLimitsSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
|
@ -303,6 +303,9 @@ export default function () {
|
||||||
this.route("navigation", function () {
|
this.route("navigation", function () {
|
||||||
this.route("settings", { path: "/" });
|
this.route("settings", { path: "/" });
|
||||||
});
|
});
|
||||||
|
this.route("rate-limits", function () {
|
||||||
|
this.route("settings", { path: "/" });
|
||||||
|
});
|
||||||
this.route("security", function () {
|
this.route("security", function () {
|
||||||
this.route("settings", { path: "/" });
|
this.route("settings", { path: "/" });
|
||||||
});
|
});
|
||||||
|
|
|
@ -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(<template>
|
||||||
|
<DPageHeader
|
||||||
|
@titleLabel={{i18n "admin.config.rate_limits.title"}}
|
||||||
|
@descriptionLabel={{i18n "admin.config.rate_limits.header_description"}}
|
||||||
|
>
|
||||||
|
<:breadcrumbs>
|
||||||
|
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||||
|
<DBreadcrumbsItem
|
||||||
|
@path="/admin/config/rate-limits"
|
||||||
|
@label={{i18n "admin.config.rate_limits.title"}}
|
||||||
|
/>
|
||||||
|
</:breadcrumbs>
|
||||||
|
</DPageHeader>
|
||||||
|
|
||||||
|
<div class="admin-config-page__main-area">
|
||||||
|
<AdminAreaSettings
|
||||||
|
@categories="rate_limits"
|
||||||
|
@path="/admin/config/rate-limits"
|
||||||
|
@filter={{@controller.filter}}
|
||||||
|
@adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>);
|
|
@ -238,9 +238,7 @@ export const ADMIN_NAV_MAP = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "admin_rate_limits",
|
name: "admin_rate_limits",
|
||||||
route: "adminSiteSettingsCategory",
|
route: "adminConfig.rate-limits.settings",
|
||||||
routeModels: ["rate_limits"],
|
|
||||||
query: { filter: "" },
|
|
||||||
label: "admin.advanced.sidebar_link.rate_limits",
|
label: "admin.advanced.sidebar_link.rate_limits",
|
||||||
icon: "rocket",
|
icon: "rocket",
|
||||||
},
|
},
|
||||||
|
|
|
@ -5158,6 +5158,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"
|
||||||
|
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:
|
search:
|
||||||
title: "Search"
|
title: "Search"
|
||||||
header_description: "Configure search settings including logging and tokenization for Chinese and Japanese languages"
|
header_description: "Configure search settings including logging and tokenization for Chinese and Japanese languages"
|
||||||
|
|
|
@ -400,6 +400,7 @@ Discourse::Application.routes.draw do
|
||||||
get "logo" => "site_settings#index"
|
get "logo" => "site_settings#index"
|
||||||
get "navigation" => "site_settings#index"
|
get "navigation" => "site_settings#index"
|
||||||
get "notifications" => "site_settings#index"
|
get "notifications" => "site_settings#index"
|
||||||
|
get "rate-limits" => "site_settings#index"
|
||||||
get "search" => "site_settings#index"
|
get "search" => "site_settings#index"
|
||||||
get "security" => "site_settings#index"
|
get "security" => "site_settings#index"
|
||||||
get "spam" => "site_settings#index"
|
get "spam" => "site_settings#index"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user