mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 03:32:40 +08:00
UX: Admin setting page consistency - Onebox (#30611)
Create a basic config page that only contains Onebox-related settings, to replace the "onebox" category view linked to from "Onebox" in the admin sidebar.
This commit is contained in:
parent
46e4290a2a
commit
ec3b6d57c2
|
@ -0,0 +1,3 @@
|
|||
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||
|
||||
export default class AdminConfigOneboxSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -0,0 +1,8 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class AdminConfigOneboxRoute extends DiscourseRoute {
|
||||
titleToken() {
|
||||
return i18n("admin.advanced.sidebar_link.onebox");
|
||||
}
|
||||
}
|
|
@ -303,6 +303,9 @@ export default function () {
|
|||
this.route("navigation", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
this.route("onebox", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
this.route("rate-limits", function () {
|
||||
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.onebox.title"}}
|
||||
@descriptionLabel={{i18n "admin.config.onebox.header_description"}}
|
||||
>
|
||||
<:breadcrumbs>
|
||||
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||
<DBreadcrumbsItem
|
||||
@path="/admin/config/onebox"
|
||||
@label={{i18n "admin.config.onebox.title"}}
|
||||
/>
|
||||
</:breadcrumbs>
|
||||
</DPageHeader>
|
||||
|
||||
<div class="admin-config-page__main-area">
|
||||
<AdminAreaSettings
|
||||
@categories="onebox"
|
||||
@path="/admin/config/onebox"
|
||||
@filter={{@controller.filter}}
|
||||
@adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
|
||||
/>
|
||||
</div>
|
||||
</template>);
|
|
@ -250,9 +250,7 @@ export const ADMIN_NAV_MAP = [
|
|||
},
|
||||
{
|
||||
name: "admin_onebox",
|
||||
route: "adminSiteSettingsCategory",
|
||||
routeModels: ["onebox"],
|
||||
query: { filter: "" },
|
||||
route: "adminConfig.onebox.settings",
|
||||
label: "admin.advanced.sidebar_link.onebox",
|
||||
icon: "far-square",
|
||||
},
|
||||
|
|
|
@ -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"
|
||||
onebox:
|
||||
title: "Onebox"
|
||||
header_description: "Configure how onebox previews are generated and displayed for your site"
|
||||
rate_limits:
|
||||
title: "Rate limits"
|
||||
header_description: "Configure how often users can perform certain actions, such as creating topics, sending messages, and posting replies"
|
||||
|
|
|
@ -401,6 +401,7 @@ Discourse::Application.routes.draw do
|
|||
get "navigation" => "site_settings#index"
|
||||
get "notifications" => "site_settings#index"
|
||||
get "rate-limits" => "site_settings#index"
|
||||
get "onebox" => "site_settings#index"
|
||||
get "search" => "site_settings#index"
|
||||
get "security" => "site_settings#index"
|
||||
get "spam" => "site_settings#index"
|
||||
|
|
Loading…
Reference in New Issue
Block a user