mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +08:00
FIX: Restore support for custom NavItem class (#24113)
A followup to 930dc38500
This commit is contained in:
parent
faac6773c5
commit
00dc063d40
|
@ -3,60 +3,60 @@
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminCustomizeThemes"
|
@route="adminCustomizeThemes"
|
||||||
@label="admin.customize.theme.title"
|
@label="admin.customize.theme.title"
|
||||||
@class="admin-customize-themes"
|
class="admin-customize-themes"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminCustomize.colors"
|
@route="adminCustomize.colors"
|
||||||
@label="admin.customize.colors.title"
|
@label="admin.customize.colors.title"
|
||||||
@class="admin-customize-colors"
|
class="admin-customize-colors"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminSiteText"
|
@route="adminSiteText"
|
||||||
@label="admin.site_text.title"
|
@label="admin.site_text.title"
|
||||||
@class="admin-customize-site-text"
|
class="admin-customize-site-text"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminCustomizeEmailTemplates"
|
@route="adminCustomizeEmailTemplates"
|
||||||
@label="admin.customize.email_templates.title"
|
@label="admin.customize.email_templates.title"
|
||||||
@class="admin-customize-email-templates"
|
class="admin-customize-email-templates"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminCustomizeEmailStyle"
|
@route="adminCustomizeEmailStyle"
|
||||||
@label="admin.customize.email_style.title"
|
@label="admin.customize.email_style.title"
|
||||||
@class="admin-customize-email-styles"
|
class="admin-customize-email-styles"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminUserFields"
|
@route="adminUserFields"
|
||||||
@label="admin.user_fields.title"
|
@label="admin.user_fields.title"
|
||||||
@class="admin-customize-user-fields"
|
class="admin-customize-user-fields"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminEmojis"
|
@route="adminEmojis"
|
||||||
@label="admin.emoji.title"
|
@label="admin.emoji.title"
|
||||||
@class="admin-customize-emojis"
|
class="admin-customize-emojis"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminPermalinks"
|
@route="adminPermalinks"
|
||||||
@label="admin.permalink.title"
|
@label="admin.permalink.title"
|
||||||
@class="admin-customize-permalinks"
|
class="admin-customize-permalinks"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminEmbedding"
|
@route="adminEmbedding"
|
||||||
@label="admin.embedding.title"
|
@label="admin.embedding.title"
|
||||||
@class="admin-customize-embedding"
|
class="admin-customize-embedding"
|
||||||
/>
|
/>
|
||||||
{{#if this.siteSettings.experimental_form_templates}}
|
{{#if this.siteSettings.experimental_form_templates}}
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminCustomizeFormTemplates"
|
@route="adminCustomizeFormTemplates"
|
||||||
@label="admin.form_templates.nav_title"
|
@label="admin.form_templates.nav_title"
|
||||||
@class="admin-customize-form-templates"
|
class="admin-customize-form-templates"
|
||||||
/>
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminWatchedWords"
|
@route="adminWatchedWords"
|
||||||
@label="admin.watched_words.title"
|
@label="admin.watched_words.title"
|
||||||
@class="admin-customize-watched-words"
|
class="admin-customize-watched-words"
|
||||||
/>
|
/>
|
||||||
</AdminNav>
|
</AdminNav>
|
||||||
|
|
||||||
|
|
|
@ -5,39 +5,39 @@
|
||||||
@route="adminUsersList.show"
|
@route="adminUsersList.show"
|
||||||
@routeParam="active"
|
@routeParam="active"
|
||||||
@label="admin.users.nav.active"
|
@label="admin.users.nav.active"
|
||||||
@class="active-users"
|
class="active-users"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminUsersList.show"
|
@route="adminUsersList.show"
|
||||||
@routeParam="new"
|
@routeParam="new"
|
||||||
@label="admin.users.nav.new"
|
@label="admin.users.nav.new"
|
||||||
@class="new-users"
|
class="new-users"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminUsersList.show"
|
@route="adminUsersList.show"
|
||||||
@routeParam="staff"
|
@routeParam="staff"
|
||||||
@label="admin.users.nav.staff"
|
@label="admin.users.nav.staff"
|
||||||
@class="staff-users"
|
class="staff-users"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminUsersList.show"
|
@route="adminUsersList.show"
|
||||||
@routeParam="suspended"
|
@routeParam="suspended"
|
||||||
@label="admin.users.nav.suspended"
|
@label="admin.users.nav.suspended"
|
||||||
@class="suspended-users"
|
class="suspended-users"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminUsersList.show"
|
@route="adminUsersList.show"
|
||||||
@routeParam="silenced"
|
@routeParam="silenced"
|
||||||
@label="admin.users.nav.silenced"
|
@label="admin.users.nav.silenced"
|
||||||
@class="silenced-users"
|
class="silenced-users"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
@route="adminUsersList.show"
|
@route="adminUsersList.show"
|
||||||
@routeParam="staged"
|
@routeParam="staged"
|
||||||
@label="admin.users.nav.staged"
|
@label="admin.users.nav.staged"
|
||||||
@class="staged-users"
|
class="staged-users"
|
||||||
/>
|
/>
|
||||||
<NavItem @route="groups" @label="groups.index.title" @class="groups" />
|
<NavItem @route="groups" @label="groups.index.title" class="groups" />
|
||||||
<PluginOutlet @name="admin-users-list-nav-after" />
|
<PluginOutlet @name="admin-users-list-nav-after" />
|
||||||
|
|
||||||
<li class="admin-actions">
|
<li class="admin-actions">
|
||||||
|
|
|
@ -3,6 +3,7 @@ import Component from "@glimmer/component";
|
||||||
import { LinkTo } from "@ember/routing";
|
import { LinkTo } from "@ember/routing";
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
|
import concatClass from "discourse/helpers/concat-class";
|
||||||
import getURL from "discourse-common/lib/get-url";
|
import getURL from "discourse-common/lib/get-url";
|
||||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||||
import I18n from "discourse-i18n";
|
import I18n from "discourse-i18n";
|
||||||
|
@ -31,7 +32,7 @@ export default class NavItem extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<li class={{if this.active "active"}}>
|
<li class={{concatClass (if this.active "active") @class}} ...attributes>
|
||||||
{{#if @routeParam}}
|
{{#if @routeParam}}
|
||||||
<LinkTo
|
<LinkTo
|
||||||
@route={{@route}}
|
@route={{@route}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user