mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:03:45 +08:00
Rename humburger_menu_categories_count site setting to header_dropdown_category_count
This commit is contained in:
parent
09bb25a287
commit
ece3cb73df
|
@ -178,7 +178,7 @@ export default createWidget("hamburger-menu", {
|
|||
|
||||
listCategories() {
|
||||
const maxCategoriesToDisplay = this.siteSettings
|
||||
.hamburger_menu_categories_count;
|
||||
.header_dropdown_category_count;
|
||||
let categories = this.site.get("categoriesByCount");
|
||||
|
||||
if (this.currentUser) {
|
||||
|
|
|
@ -168,7 +168,7 @@ class CurrentUserSerializer < BasicUserSerializer
|
|||
WHEN notification_level = 4 THEN 3
|
||||
END")
|
||||
.pluck(:category_id)
|
||||
.slice(0, SiteSetting.hamburger_menu_categories_count)
|
||||
.slice(0, SiteSetting.header_dropdown_category_count)
|
||||
end
|
||||
|
||||
def dismissed_banner_key
|
||||
|
|
|
@ -1655,7 +1655,7 @@ en:
|
|||
|
||||
suppress_uncategorized_badge: "Don't show the badge for uncategorized topics in topic lists."
|
||||
|
||||
hamburger_menu_categories_count: "How many categories can be displayed in the hamburger menu."
|
||||
header_dropdown_category_count: "How many categories can be displayed in the header dropdown menu."
|
||||
|
||||
permalink_normalizations: "Apply the following regex before matching permalinks, for example: /(topic.*)\\?.*/\\1 will strip query strings from topic routes. Format is regex+string use \\1 etc. to access captures"
|
||||
|
||||
|
|
|
@ -1415,7 +1415,7 @@ uncategorized:
|
|||
client: true
|
||||
default: true
|
||||
|
||||
hamburger_menu_categories_count:
|
||||
header_dropdown_category_count:
|
||||
client: true
|
||||
default: 8
|
||||
|
||||
|
|
|
@ -138,8 +138,8 @@ widgetTest("top categories - anonymous", {
|
|||
anonymous: true,
|
||||
|
||||
beforeEach() {
|
||||
this.siteSettings.hamburger_menu_categories_count = 8;
|
||||
maxCategoriesToDisplay = this.siteSettings.hamburger_menu_categories_count;
|
||||
this.siteSettings.header_dropdown_category_count = 8;
|
||||
maxCategoriesToDisplay = this.siteSettings.header_dropdown_category_count;
|
||||
categoriesByCount = this.site.get("categoriesByCount");
|
||||
},
|
||||
|
||||
|
@ -162,8 +162,8 @@ widgetTest("top categories", {
|
|||
template: '{{mount-widget widget="hamburger-menu"}}',
|
||||
|
||||
beforeEach() {
|
||||
this.siteSettings.hamburger_menu_categories_count = 8;
|
||||
maxCategoriesToDisplay = this.siteSettings.hamburger_menu_categories_count;
|
||||
this.siteSettings.header_dropdown_category_count = 8;
|
||||
maxCategoriesToDisplay = this.siteSettings.header_dropdown_category_count;
|
||||
categoriesByCount = this.site.get("categoriesByCount").slice();
|
||||
categoriesByCount.every(c => {
|
||||
if (!topCategoryIds.includes(c.id)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user