mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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
4 changed files with 14 additions and 10 deletions
|
@ -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
|
@action
|
||||||
loadMore() {
|
loadMore() {
|
||||||
this.findMembers();
|
this.findMembers();
|
||||||
|
|
|
@ -111,13 +111,9 @@
|
||||||
{{/load-more}}
|
{{/load-more}}
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=loading}}
|
{{conditional-loading-spinner condition=loading}}
|
||||||
{{else if model.can_see_members}}
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div>{{i18n "groups.empty.members"}}</div>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div>{{i18n "groups.members.forbidden"}}</div>
|
<div>{{i18n emptyMessageKey}}</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -49,13 +49,9 @@
|
||||||
{{/load-more}}
|
{{/load-more}}
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=loading}}
|
{{conditional-loading-spinner condition=loading}}
|
||||||
{{else if model.can_see_members}}
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div>{{i18n "groups.empty.members"}}</div>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div>{{i18n "groups.members.forbidden"}}</div>
|
<div>{{i18n emptyMessageKey}}</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -850,6 +850,7 @@ en:
|
||||||
owner: "Owner"
|
owner: "Owner"
|
||||||
primary: "Primary"
|
primary: "Primary"
|
||||||
forbidden: "You're not allowed to view the members."
|
forbidden: "You're not allowed to view the members."
|
||||||
|
no_filter_matches: "No members match that search."
|
||||||
topics: "Topics"
|
topics: "Topics"
|
||||||
posts: "Posts"
|
posts: "Posts"
|
||||||
mentions: "Mentions"
|
mentions: "Mentions"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue