mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 04:02:40 +08:00
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:
parent
01ceeae2d6
commit
5463b845e3
|
@ -0,0 +1,3 @@
|
|||
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||
|
||||
export default class AdminConfigLogoSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -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");
|
||||
}
|
||||
}
|
|
@ -265,6 +265,9 @@ export default function () {
|
|||
this.route("fonts", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
this.route("logo", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -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>
|
|
@ -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",
|
||||
},
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user