mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:02:46 +08: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_CATS_TAGS = "categories_tags";
|
||||||
export const SEARCH_TYPE_USERS = "users";
|
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;
|
const PAGE_LIMIT = 10;
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
|
@ -66,11 +58,21 @@ export default Controller.extend({
|
||||||
invalidSearch: false,
|
invalidSearch: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
resultCount: null,
|
resultCount: null,
|
||||||
searchTypes: SearchTypes,
|
searchTypes: null,
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this._super(...arguments);
|
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 = [];
|
this.selected = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -2365,6 +2365,7 @@ en:
|
||||||
type:
|
type:
|
||||||
default: "Topics/posts"
|
default: "Topics/posts"
|
||||||
users: "Users"
|
users: "Users"
|
||||||
|
categories: "Categories"
|
||||||
categories_and_tags: "Categories/tags"
|
categories_and_tags: "Categories/tags"
|
||||||
|
|
||||||
context:
|
context:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user