feat: allow option to disable upload

This commit is contained in:
Shivam Mishra
2025-06-04 16:34:47 +05:30
parent d74798fcd5
commit 6f86944758
3 changed files with 9 additions and 4 deletions
+6 -4
View File
@@ -107,8 +107,9 @@ export default {
maxLength() {
return MESSAGE_MAX_LENGTH.GENERAL;
},
showFileUpload() {
return true;
allowFileUpload() {
// eslint-disable-next-line no-underscore-dangle
return window.__EDITOR_DISABLE_UPLOAD__ !== true;
},
replyButtonLabel() {
if (this.isPrivate) {
@@ -412,7 +413,6 @@ export default {
</div>
<ReplyBottomPanel
:conversation-id="conversationId"
enable-multiple-file-upload
:inbox="inbox"
:is-on-private-note="isOnPrivateNote"
:is-send-disabled="isReplyButtonDisabled"
@@ -424,8 +424,10 @@ export default {
:show-audio-recorder="showAudioRecorder"
:show-editor-toggle="isAPIInbox && !isOnPrivateNote"
:show-emoji-picker="false"
:show-file-upload="showFileUpload"
:show-file-upload="allowFileUpload"
:message="message"
:enable-multiple-file-upload="allowFileUpload"
:allow-file-upload="allowFileUpload"
/>
</div>
</template>