FIX: Popup menu not showing for non-staff users.
This commit is contained in:
parent
fde5ef4902
commit
ddfb798276
|
@ -419,7 +419,7 @@ export default Ember.Component.extend({
|
|||
sendAction: 'showUploadModal'
|
||||
});
|
||||
|
||||
if (this.get("popupMenuOptions").some(option => option.condition)) {
|
||||
if (this.get("showPopupMenu")) {
|
||||
toolbar.addButton({
|
||||
id: 'options',
|
||||
group: 'extras',
|
||||
|
|
|
@ -111,6 +111,11 @@ export default Ember.Controller.extend({
|
|||
return currentUser && currentUser.get('staff') && this.siteSettings.enable_whispers && action === Composer.REPLY;
|
||||
},
|
||||
|
||||
@computed("popupMenuOptions")
|
||||
showPopupMenu(popupMenuOptions) {
|
||||
return popupMenuOptions.some(option => option.condition);
|
||||
},
|
||||
|
||||
@computed("model.composeState")
|
||||
popupMenuOptions(composeState) {
|
||||
if (composeState === 'open') {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{#if visible}}
|
||||
<div class='contents'>
|
||||
|
||||
{{#if currentUser.staff}}
|
||||
{{#if showPopupMenu}}
|
||||
{{#popup-menu visible=optionsVisible hide="hideOptions" title="composer.options"}}
|
||||
{{#each popupMenuOptions as |option|}}
|
||||
{{#if option.condition}}
|
||||
|
@ -90,7 +90,7 @@
|
|||
composer=model
|
||||
lastValidatedAt=lastValidatedAt
|
||||
canWhisper=canWhisper
|
||||
popupMenuOptions=popupMenuOptions
|
||||
showPopupMenu=showPopupMenu
|
||||
draftStatus=model.draftStatus
|
||||
isUploading=isUploading
|
||||
groupsMentioned="groupsMentioned"
|
||||
|
|
Loading…
Reference in New Issue