From 94c56ef550e0945dbab974a0fa71da4a63616a22 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 6 Oct 2020 21:05:24 +1100 Subject: [PATCH] Make uploadIcon responsive to authorized extensions --- .../wizard/components/wizard-composer-editor.js.es6 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 index 1aae6351..30ee288d 100644 --- a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 +++ b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 @@ -16,6 +16,7 @@ import { } from "discourse/lib/uploads"; import { cacheShortUploadUrl } from "pretty-text/upload-short-url"; import { alias } from "@ember/object/computed"; +import { uploadIcon } from "discourse/lib/uploads"; const uploadMarkdownResolvers = []; @@ -30,7 +31,6 @@ export default ComposerEditor.extend({ focusTarget: "reply", canWhisper: false, lastValidatedAt: "lastValidatedAt", - uploadIcon: "upload", popupMenuOptions: [], draftStatus: "null", replyPlaceholder: alias("field.placeholder"), @@ -73,6 +73,11 @@ export default ComposerEditor.extend({ .join(',') }, + @discourseComputed('currentUser') + uploadIcon(currentUser) { + return uploadIcon(false, this.siteSettings); + }, + _setUploadPlaceholderSend() { if (!this.composer.get("reply")) { this.composer.set("reply", "");