UX: Show first unique letters in invite link (#12434)
This commit is contained in:
parent
da210b6d77
commit
5024ea72d2
|
@ -34,6 +34,11 @@ const Invite = EmberObject.extend({
|
|||
.catch(popupAjaxError);
|
||||
},
|
||||
|
||||
@discourseComputed("invite_key")
|
||||
shortKey(key) {
|
||||
return key.substr(0, 4) + "...";
|
||||
},
|
||||
|
||||
@discourseComputed("groups")
|
||||
groupIds(groups) {
|
||||
return groups ? groups.map((group) => group.id) : [];
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
{{#if invite.email}}
|
||||
{{invite.email}}
|
||||
{{else}}
|
||||
{{i18n "user.invited.invited_via_link" count=invite.redemption_count max=invite.max_redemptions_allowed}}
|
||||
{{i18n "user.invited.invited_via_link" key=invite.shortKey count=invite.redemption_count max=invite.max_redemptions_allowed}}
|
||||
{{/if}}
|
||||
</td>
|
||||
{{#if currentUser.staff}}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
class InviteSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:invite_key,
|
||||
:link,
|
||||
:email,
|
||||
:emailed,
|
||||
|
|
|
@ -1448,7 +1448,7 @@ en:
|
|||
redeemed_tab: "Redeemed"
|
||||
redeemed_tab_with_count: "Redeemed (%{count})"
|
||||
invited_via: "Invitation"
|
||||
invited_via_link: "link (%{count} / %{max} redeemed)"
|
||||
invited_via_link: "link %{key} (%{count} / %{max} redeemed)"
|
||||
groups: "Groups"
|
||||
topic: "Topic"
|
||||
sent: "Created/Last Sent"
|
||||
|
|
Loading…
Reference in New Issue