mirror of
https://github.com/discourse/discourse.git
synced 2025-04-11 13:42:57 +08:00
FEATURE: Share Topic modal improvements (#12834)
This PR includes few commits that improve the new "Share Topic" modal: same icon for notify button as the notification, advanced options are only showed for staff, but the topic name should be visible to everyone.
This commit is contained in:
parent
2c417338ed
commit
b32c7df0e9
@ -19,8 +19,9 @@ export default Controller.extend(
|
|||||||
invite: null,
|
invite: null,
|
||||||
invites: null,
|
invites: null,
|
||||||
|
|
||||||
autogenerated: false,
|
|
||||||
showAdvanced: false,
|
showAdvanced: false,
|
||||||
|
limitToEmail: false,
|
||||||
|
autogenerated: false,
|
||||||
|
|
||||||
type: "link",
|
type: "link",
|
||||||
|
|
||||||
@ -32,8 +33,9 @@ export default Controller.extend(
|
|||||||
this.setProperties({
|
this.setProperties({
|
||||||
invite: null,
|
invite: null,
|
||||||
invites: null,
|
invites: null,
|
||||||
autogenerated: false,
|
|
||||||
showAdvanced: false,
|
showAdvanced: false,
|
||||||
|
limitToEmail: false,
|
||||||
|
autogenerated: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setInvite(Invite.create());
|
this.setInvite(Invite.create());
|
||||||
|
@ -52,15 +52,17 @@
|
|||||||
|
|
||||||
{{#if isEmail}}
|
{{#if isEmail}}
|
||||||
{{#if showAdvanced}}
|
{{#if showAdvanced}}
|
||||||
|
{{#if currentUser.staff}}
|
||||||
<div class="input-group invite-custom-message">
|
<div class="input-group invite-custom-message">
|
||||||
<label for="invite-message">{{i18n "user.invited.invite.custom_message"}}</label>
|
<label for="invite-message">{{i18n "user.invited.invite.custom_message"}}</label>
|
||||||
{{textarea id="invite-message" value=buffered.custom_message}}
|
{{textarea id="invite-message" value=buffered.custom_message}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if currentUser.staff}}
|
|
||||||
{{#if showAdvanced}}
|
{{#if showAdvanced}}
|
||||||
|
{{#if currentUser.staff}}
|
||||||
<div class="input-group invite-to-topic">
|
<div class="input-group invite-to-topic">
|
||||||
{{choose-topic
|
{{choose-topic
|
||||||
selectedTopicId=buffered.topicId
|
selectedTopicId=buffered.topicId
|
||||||
@ -69,11 +71,21 @@
|
|||||||
label="user.invited.invite.invite_to_topic"
|
label="user.invited.invite.invite_to_topic"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="input-group">
|
||||||
|
<label for="invite-topic">{{i18n "user.invited.invite.invite_to_topic"}}</label>
|
||||||
|
{{input
|
||||||
|
name="invite-topic"
|
||||||
|
class="invite-topic"
|
||||||
|
value=buffered.topicTitle
|
||||||
|
readonly=true
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if currentUser.staff}}
|
|
||||||
{{#if showAdvanced}}
|
{{#if showAdvanced}}
|
||||||
|
{{#if currentUser.staff}}
|
||||||
<div class="input-group invite-to-groups">
|
<div class="input-group invite-to-groups">
|
||||||
<label>{{i18n "user.invited.invite.add_to_groups"}}</label>
|
<label>{{i18n "user.invited.invite.add_to_groups"}}</label>
|
||||||
{{group-chooser
|
{{group-chooser
|
||||||
@ -86,8 +98,8 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if currentUser.staff}}
|
|
||||||
{{#if showAdvanced}}
|
{{#if showAdvanced}}
|
||||||
|
{{#if currentUser.staff}}
|
||||||
<div class="input-group invite-expires-at">
|
<div class="input-group invite-expires-at">
|
||||||
{{future-date-input
|
{{future-date-input
|
||||||
displayLabel=(i18n "user.invited.invite.expires_at")
|
displayLabel=(i18n "user.invited.invite.expires_at")
|
||||||
@ -121,10 +133,12 @@
|
|||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if currentUser.staff}}
|
||||||
{{d-button
|
{{d-button
|
||||||
action=(action "toggleAdvanced")
|
action=(action "toggleAdvanced")
|
||||||
class="show-advanced"
|
class="show-advanced"
|
||||||
icon="cog"
|
icon="cog"
|
||||||
title=(if showAdvanced "user.invited.invite.hide_advanced" "user.invited.invite.show_advanced")
|
title=(if showAdvanced "user.invited.invite.hide_advanced" "user.invited.invite.show_advanced")
|
||||||
}}
|
}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{{d-button
|
{{d-button
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
label="topic.share.notify_users.title"
|
label="topic.share.notify_users.title"
|
||||||
icon="users"
|
icon="hand-point-right"
|
||||||
action=(action "toggleNotifyUsers")
|
action=(action "toggleNotifyUsers")
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user