mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
UX: Fix label in search when tagging is disabled (#14503)
This commit is contained in:
parent
a9d20610d4
commit
23df78acb3
@ -32,14 +32,6 @@ export const SEARCH_TYPE_DEFAULT = "topics_posts";
|
||||
export const SEARCH_TYPE_CATS_TAGS = "categories_tags";
|
||||
export const SEARCH_TYPE_USERS = "users";
|
||||
|
||||
const SearchTypes = [
|
||||
{ name: I18n.t("search.type.default"), id: SEARCH_TYPE_DEFAULT },
|
||||
{
|
||||
name: I18n.t("search.type.categories_and_tags"),
|
||||
id: SEARCH_TYPE_CATS_TAGS,
|
||||
},
|
||||
{ name: I18n.t("search.type.users"), id: SEARCH_TYPE_USERS },
|
||||
];
|
||||
const PAGE_LIMIT = 10;
|
||||
|
||||
export default Controller.extend({
|
||||
@ -66,11 +58,21 @@ export default Controller.extend({
|
||||
invalidSearch: false,
|
||||
page: 1,
|
||||
resultCount: null,
|
||||
searchTypes: SearchTypes,
|
||||
searchTypes: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.set("searchTypes", [
|
||||
{ name: I18n.t("search.type.default"), id: SEARCH_TYPE_DEFAULT },
|
||||
{
|
||||
name: this.siteSettings.tagging_enabled
|
||||
? I18n.t("search.type.categories_and_tags")
|
||||
: I18n.t("search.type.categories"),
|
||||
id: SEARCH_TYPE_CATS_TAGS,
|
||||
},
|
||||
{ name: I18n.t("search.type.users"), id: SEARCH_TYPE_USERS },
|
||||
]);
|
||||
this.selected = [];
|
||||
},
|
||||
|
||||
|
@ -2365,6 +2365,7 @@ en:
|
||||
type:
|
||||
default: "Topics/posts"
|
||||
users: "Users"
|
||||
categories: "Categories"
|
||||
categories_and_tags: "Categories/tags"
|
||||
|
||||
context:
|
||||
|
Loading…
Reference in New Issue
Block a user