UX: Admin setting page consistency - Site Logo (#30567)

Create a basic config page that only contains site logo settings, to replace the "branding" category linked to from "Site logo" in the admin sidebar.
This commit is contained in:
Gary Pendergast 2025-01-06 15:45:19 +11:00 committed by GitHub
parent 01ceeae2d6
commit 5463b845e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 40 additions and 3 deletions

View File

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

View File

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

View File

@ -265,6 +265,9 @@ export default function () {
this.route("fonts", function () { this.route("fonts", function () {
this.route("settings", { path: "/" }); this.route("settings", { path: "/" });
}); });
this.route("logo", function () {
this.route("settings", { path: "/" });
});
} }
); );

View File

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

View File

@ -108,9 +108,7 @@ export const ADMIN_NAV_MAP = [
}, },
{ {
name: "admin_site_logo", name: "admin_site_logo",
route: "adminSiteSettingsCategory", route: "adminConfig.logo.settings",
routeModels: ["branding"],
query: { filter: "" },
label: "admin.appearance.sidebar_link.site_logo", label: "admin.appearance.sidebar_link.site_logo",
icon: "fab-discourse", icon: "fab-discourse",
}, },

View File

@ -5140,6 +5140,9 @@ en:
login_and_authentication: login_and_authentication:
title: "Login and authentication" title: "Login and authentication"
header_description: "Configure how users log in and authenticate, secrets and keys, OAuth2 providers, and more." header_description: "Configure how users log in and authenticate, secrets and keys, OAuth2 providers, and more."
logo:
title: "Site logo"
header_description: "Customize the variations of your site logo."
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."

View File

@ -395,6 +395,7 @@ Discourse::Application.routes.draw do
get "fonts" => "site_settings#index" get "fonts" => "site_settings#index"
get "login-and-authentication" => "site_settings#index" get "login-and-authentication" => "site_settings#index"
get "logo" => "site_settings#index"
get "notifications" => "site_settings#index" get "notifications" => "site_settings#index"
resources :flags, only: %i[index new create update destroy] do resources :flags, only: %i[index new create update destroy] do