UX: change glyph when inviting existing user to a topic
This commit is contained in:
parent
ee823305a1
commit
23c1c5ef19
|
@ -6,6 +6,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
// If this isn't defined, it will proxy to the user model on the preferences
|
// If this isn't defined, it will proxy to the user model on the preferences
|
||||||
// page which is wrong.
|
// page which is wrong.
|
||||||
emailOrUsername: null,
|
emailOrUsername: null,
|
||||||
|
inviteIcon: "envelope",
|
||||||
|
|
||||||
isAdmin: function(){
|
isAdmin: function(){
|
||||||
return Discourse.User.currentProp("admin");
|
return Discourse.User.currentProp("admin");
|
||||||
|
@ -88,8 +89,10 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
if (Ember.isEmpty(this.get('emailOrUsername'))) {
|
if (Ember.isEmpty(this.get('emailOrUsername'))) {
|
||||||
return I18n.t('topic.invite_reply.to_topic_blank');
|
return I18n.t('topic.invite_reply.to_topic_blank');
|
||||||
} else if (Discourse.Utilities.emailValid(this.get('emailOrUsername'))) {
|
} else if (Discourse.Utilities.emailValid(this.get('emailOrUsername'))) {
|
||||||
|
this.set("inviteIcon", "envelope");
|
||||||
return I18n.t('topic.invite_reply.to_topic_email');
|
return I18n.t('topic.invite_reply.to_topic_email');
|
||||||
} else {
|
} else {
|
||||||
|
this.set("inviteIcon", "hand-o-right");
|
||||||
return I18n.t('topic.invite_reply.to_topic_username');
|
return I18n.t('topic.invite_reply.to_topic_username');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
{{#if model.finished}}
|
{{#if model.finished}}
|
||||||
{{d-button class="btn-primary" action="closeModal" label="close"}}
|
{{d-button class="btn-primary" action="closeModal" label="close"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{d-button icon="envelope" action="createInvite" class="btn-primary" disabled=disabled label=buttonTitle}}
|
{{d-button icon=inviteIcon action="createInvite" class="btn-primary" disabled=disabled label=buttonTitle}}
|
||||||
{{#if showCopyInviteButton}}
|
{{#if showCopyInviteButton}}
|
||||||
{{d-button icon="link" action="generateInvitelink" class="btn-primary" disabled=disabledCopyLink label='user.invited.generate_link'}}
|
{{d-button icon="link" action="generateInvitelink" class="btn-primary" disabled=disabledCopyLink label='user.invited.generate_link'}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Reference in New Issue