mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:12:26 +08:00
UX: Improve copy when a group member search returns no results (#13899)
Previously it would say "There are no members in this group". Now it says "No members match that search." https://meta.discourse.org/t/group-username-search-empty-search-message-is-wrong/198609
This commit is contained in:
parent
0c422cff1e
commit
ccf1cd0ca6
|
@ -83,6 +83,17 @@ export default Controller.extend({
|
|||
}
|
||||
},
|
||||
|
||||
@discourseComputed("filter", "members", "model.can_see_members")
|
||||
emptyMessageKey(filter, members, canSeeMembers) {
|
||||
if (!canSeeMembers) {
|
||||
return "groups.members.forbidden";
|
||||
} else if (filter) {
|
||||
return "groups.members.no_filter_matches";
|
||||
} else {
|
||||
return "groups.empty.members";
|
||||
}
|
||||
},
|
||||
|
||||
@action
|
||||
loadMore() {
|
||||
this.findMembers();
|
||||
|
|
|
@ -111,13 +111,9 @@
|
|||
{{/load-more}}
|
||||
|
||||
{{conditional-loading-spinner condition=loading}}
|
||||
{{else if model.can_see_members}}
|
||||
<br>
|
||||
|
||||
<div>{{i18n "groups.empty.members"}}</div>
|
||||
{{else}}
|
||||
<br>
|
||||
|
||||
<div>{{i18n "groups.members.forbidden"}}</div>
|
||||
<div>{{i18n emptyMessageKey}}</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
@ -49,13 +49,9 @@
|
|||
{{/load-more}}
|
||||
|
||||
{{conditional-loading-spinner condition=loading}}
|
||||
{{else if model.can_see_members}}
|
||||
<br>
|
||||
|
||||
<div>{{i18n "groups.empty.members"}}</div>
|
||||
{{else}}
|
||||
<br>
|
||||
|
||||
<div>{{i18n "groups.members.forbidden"}}</div>
|
||||
<div>{{i18n emptyMessageKey}}</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
@ -850,6 +850,7 @@ en:
|
|||
owner: "Owner"
|
||||
primary: "Primary"
|
||||
forbidden: "You're not allowed to view the members."
|
||||
no_filter_matches: "No members match that search."
|
||||
topics: "Topics"
|
||||
posts: "Posts"
|
||||
mentions: "Mentions"
|
||||
|
|
Loading…
Reference in New Issue
Block a user