mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: Popup menu not showing for non-staff users.
This commit is contained in:
parent
fde5ef4902
commit
ddfb798276
3 changed files with 8 additions and 3 deletions
|
@ -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 a new issue