diff --git a/app/assets/javascripts/admin/addon/controllers/admin-config-logo-settings.js b/app/assets/javascripts/admin/addon/controllers/admin-config-logo-settings.js new file mode 100644 index 00000000000..b3ac39ad4a7 --- /dev/null +++ b/app/assets/javascripts/admin/addon/controllers/admin-config-logo-settings.js @@ -0,0 +1,3 @@ +import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base"; + +export default class AdminConfigLogoSettingsController extends AdminAreaSettingsBaseController {} diff --git a/app/assets/javascripts/admin/addon/routes/admin-config-logo.js b/app/assets/javascripts/admin/addon/routes/admin-config-logo.js new file mode 100644 index 00000000000..2c8548a5f4e --- /dev/null +++ b/app/assets/javascripts/admin/addon/routes/admin-config-logo.js @@ -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"); + } +} diff --git a/app/assets/javascripts/admin/addon/routes/admin-route-map.js b/app/assets/javascripts/admin/addon/routes/admin-route-map.js index e9136b0f770..c10775f5fca 100644 --- a/app/assets/javascripts/admin/addon/routes/admin-route-map.js +++ b/app/assets/javascripts/admin/addon/routes/admin-route-map.js @@ -265,6 +265,9 @@ export default function () { this.route("fonts", function () { this.route("settings", { path: "/" }); }); + this.route("logo", function () { + this.route("settings", { path: "/" }); + }); } ); diff --git a/app/assets/javascripts/admin/addon/templates/config-logo-settings.hbs b/app/assets/javascripts/admin/addon/templates/config-logo-settings.hbs new file mode 100644 index 00000000000..ebe1a00209e --- /dev/null +++ b/app/assets/javascripts/admin/addon/templates/config-logo-settings.hbs @@ -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> \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js index 525536006da..2246c33de0e 100644 --- a/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js +++ b/app/assets/javascripts/discourse/app/lib/sidebar/admin-nav-map.js @@ -108,9 +108,7 @@ export const ADMIN_NAV_MAP = [ }, { name: "admin_site_logo", - route: "adminSiteSettingsCategory", - routeModels: ["branding"], - query: { filter: "" }, + route: "adminConfig.logo.settings", label: "admin.appearance.sidebar_link.site_logo", icon: "fab-discourse", }, diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index eb35275381a..e3ec31de863 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -5140,6 +5140,9 @@ en: login_and_authentication: title: "Login and authentication" 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: title: "Notifications" header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation." diff --git a/config/routes.rb b/config/routes.rb index 08e82408258..d92ecf6adee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -395,6 +395,7 @@ Discourse::Application.routes.draw do get "fonts" => "site_settings#index" get "login-and-authentication" => "site_settings#index" + get "logo" => "site_settings#index" get "notifications" => "site_settings#index" resources :flags, only: %i[index new create update destroy] do