mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 03:42:41 +08:00
UX: Admin setting page consistency - Navigation (#30574)
Create a basic config page that only contains navigation-related settings, to replace the setting filtered view linked to from "Navigation" in the admin sidebar.
This commit is contained in:
parent
7922e6bfc0
commit
f5126199f6
|
@ -1,3 +1,3 @@
|
|||
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||
|
||||
export default class AdminConfigFontsController extends AdminAreaSettingsBaseController {}
|
||||
export default class AdminConfigFontsSettingsController extends AdminAreaSettingsBaseController {}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||
|
||||
export default class AdminConfigNavigationSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -0,0 +1,8 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class AdminConfigNavigationRoute extends DiscourseRoute {
|
||||
titleToken() {
|
||||
return i18n("admin.appearance.sidebar_link.navigation");
|
||||
}
|
||||
}
|
|
@ -283,6 +283,9 @@ export default function () {
|
|||
this.route("logo", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
this.route("navigation", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<DPageHeader
|
||||
@titleLabel={{i18n "admin.config.navigation.title"}}
|
||||
@descriptionLabel={{i18n "admin.config.navigation.header_description"}}
|
||||
>
|
||||
<:breadcrumbs>
|
||||
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||
<DBreadcrumbsItem
|
||||
@path="/admin/config/navigation"
|
||||
@label={{i18n "admin.config.navigation.title"}}
|
||||
/>
|
||||
</:breadcrumbs>
|
||||
</DPageHeader>
|
||||
|
||||
<div class="admin-config-page__main-area">
|
||||
<AdminAreaSettings
|
||||
@area="navigation"
|
||||
@path="/admin/config/navigation"
|
||||
@filter={{this.filter}}
|
||||
@adminSettingsFilterChangedCallback={{this.adminSettingsFilterChangedCallback}}
|
||||
/>
|
||||
</div>
|
|
@ -122,9 +122,7 @@ export const ADMIN_NAV_MAP = [
|
|||
},
|
||||
{
|
||||
name: "admin_navigation",
|
||||
route: "adminSiteSettingsCategory",
|
||||
routeModels: ["all_results"],
|
||||
query: { filter: "navigation" },
|
||||
route: "adminConfig.navigation.settings",
|
||||
label: "admin.appearance.sidebar_link.navigation",
|
||||
icon: "diagram-project",
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SiteSetting < ActiveRecord::Base
|
||||
VALID_AREAS = %w[about embedding emojis flags fonts legal notifications permalinks]
|
||||
VALID_AREAS = %w[about embedding emojis flags fonts legal navigation notifications permalinks]
|
||||
|
||||
extend GlobalPath
|
||||
extend SiteSettingExtension
|
||||
|
|
|
@ -5143,6 +5143,9 @@ en:
|
|||
logo:
|
||||
title: "Site logo"
|
||||
header_description: "Customize the variations of your site logo."
|
||||
navigation:
|
||||
title: "Navigation"
|
||||
header_description: "Configure the navigation links and menu items for your site. This includes the location and behaviour of the primary navigation menu, the quick links at the top of the homepage, as well as the admin sidebar."
|
||||
notifications:
|
||||
title: "Notifications"
|
||||
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
|
||||
|
|
|
@ -396,6 +396,7 @@ Discourse::Application.routes.draw do
|
|||
get "fonts" => "site_settings#index"
|
||||
get "login-and-authentication" => "site_settings#index"
|
||||
get "logo" => "site_settings#index"
|
||||
get "navigation" => "site_settings#index"
|
||||
get "notifications" => "site_settings#index"
|
||||
get "search" => "site_settings#index"
|
||||
get "legal" => "site_settings#index"
|
||||
|
|
|
@ -216,6 +216,7 @@ basic:
|
|||
- posted
|
||||
- bookmarks
|
||||
- hot
|
||||
area: "navigation"
|
||||
post_menu:
|
||||
client: true
|
||||
type: list
|
||||
|
@ -283,10 +284,12 @@ basic:
|
|||
client: true
|
||||
enum: "CategoryPageStyle"
|
||||
default: "categories_and_latest_topics"
|
||||
area: "navigation"
|
||||
mobile_category_page_style:
|
||||
client: true
|
||||
enum: "MobileCategoryPageStyle"
|
||||
default: "categories_with_featured_topics"
|
||||
area: "navigation"
|
||||
category_colors:
|
||||
client: true
|
||||
type: list
|
||||
|
@ -427,6 +430,7 @@ basic:
|
|||
choices:
|
||||
- spinner
|
||||
- slider
|
||||
area: "navigation"
|
||||
show_user_menu_avatars:
|
||||
client: true
|
||||
default: false
|
||||
|
@ -2504,6 +2508,7 @@ developer:
|
|||
default: "1|2"
|
||||
allow_any: false
|
||||
refresh: true
|
||||
area: "navigation"
|
||||
warn_critical_js_deprecations:
|
||||
default: true
|
||||
client: true
|
||||
|
@ -2523,14 +2528,17 @@ navigation:
|
|||
default: "sidebar"
|
||||
type: enum
|
||||
enum: "NavigationMenuSiteSetting"
|
||||
area: "navigation"
|
||||
default_navigation_menu_categories:
|
||||
type: category_list
|
||||
default: ""
|
||||
client: true
|
||||
area: "navigation"
|
||||
default_navigation_menu_tags:
|
||||
type: tag_list
|
||||
default: ""
|
||||
client: true
|
||||
area: "navigation"
|
||||
default_sidebar_switch_panel_position:
|
||||
default: "bottom"
|
||||
type: enum
|
||||
|
@ -2538,6 +2546,7 @@ navigation:
|
|||
choices:
|
||||
- "top"
|
||||
- "bottom"
|
||||
area: "navigation"
|
||||
|
||||
embedding:
|
||||
embed_by_username:
|
||||
|
@ -2734,6 +2743,7 @@ uncategorized:
|
|||
header_dropdown_category_count:
|
||||
client: true
|
||||
default: 8
|
||||
area: "navigation"
|
||||
|
||||
slug_generation_method:
|
||||
default: "ascii"
|
||||
|
@ -3162,8 +3172,12 @@ user_preferences:
|
|||
enable_offline_indicator:
|
||||
default: false
|
||||
client: true
|
||||
default_sidebar_link_to_filtered_list: false
|
||||
default_sidebar_show_count_of_new_items: false
|
||||
default_sidebar_link_to_filtered_list:
|
||||
default: false
|
||||
area: "navigation"
|
||||
default_sidebar_show_count_of_new_items:
|
||||
default: false
|
||||
area: "navigation"
|
||||
|
||||
api:
|
||||
retain_web_hook_events_period_days:
|
||||
|
@ -3386,6 +3400,7 @@ experimental:
|
|||
default: ""
|
||||
allow_any: false
|
||||
refresh: true
|
||||
area: "navigation"
|
||||
glimmer_topic_list_mode:
|
||||
client: true
|
||||
type: enum
|
||||
|
|
|
@ -123,6 +123,7 @@ chat:
|
|||
default: "never"
|
||||
type: enum
|
||||
enum: "Chat::SeparateSidebarModeSiteSetting"
|
||||
area: "navigation"
|
||||
chat_editing_grace_period:
|
||||
client: true
|
||||
type: integer
|
||||
|
|
Loading…
Reference in New Issue
Block a user