UX: Admin setting page consistency - Search (#30528) (#30573)

Followup c2282439b3

Make the Search config page reached from the sidebar
use our consistent site setting page rules.
This commit is contained in:
Martin Brennan 2025-01-06 16:36:48 +10:00 committed by GitHub
parent 15a7a84d84
commit 17f4052068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 42 additions and 3 deletions

View File

@ -0,0 +1,3 @@
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
export default class AdminConfigSearchSettingsController extends AdminAreaSettingsBaseController {}

View File

@ -0,0 +1,8 @@
import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class AdminConfigSearchRoute extends DiscourseRoute {
titleToken() {
return i18n("admin.advanced.sidebar_link.search");
}
}

View File

@ -231,6 +231,11 @@ export default function () {
path: "/",
});
});
this.route("search", function () {
this.route("settings", {
path: "/",
});
});
this.route("legal", function () {
this.route("settings", {
path: "/",

View File

@ -0,0 +1,21 @@
<DPageHeader
@titleLabel={{i18n "admin.config.search.title"}}
@descriptionLabel={{i18n "admin.config.search.header_description"}}
>
<:breadcrumbs>
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
<DBreadcrumbsItem
@path="/admin/config/search"
@label={{i18n "admin.config.search.title"}}
/>
</:breadcrumbs>
</DPageHeader>
<div class="admin-config-page__main-area">
<AdminAreaSettings
@categories="search"
@path="/admin/config/search"
@filter={{this.filter}}
@adminSettingsFilterChangedCallback={{this.adminSettingsFilterChangedCallback}}
/>
</div>

View File

@ -280,9 +280,7 @@ export const ADMIN_NAV_MAP = [
},
{
name: "admin_search",
route: "adminSiteSettingsCategory",
routeModels: ["search"],
query: { filter: "" },
route: "adminConfig.search.settings",
label: "admin.advanced.sidebar_link.search",
icon: "magnifying-glass",
},

View File

@ -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."
search:
title: "Search"
header_description: "Configure search settings including logging and tokenization for Chinese and Japanese languages."
legal:
title: "Legal"
header_description: "Configure legal settings, such as terms of service, privacy policy, contact details, and EU-specific considerations."

View File

@ -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 "search" => "site_settings#index"
get "legal" => "site_settings#index"
get "trust-levels" => "site_settings#index"