feat: allow option to disable upload
This commit is contained in:
@@ -122,6 +122,7 @@ export default {
|
||||
allowEmoji: { type: Boolean, default: false },
|
||||
allowAiAssist: { type: Boolean, default: false },
|
||||
allowVideoCall: { type: Boolean, default: false },
|
||||
allowFileUpload: { type: Boolean, default: false },
|
||||
allowAudioRecorder: { type: Boolean, default: false },
|
||||
},
|
||||
emits: [
|
||||
@@ -278,6 +279,7 @@ export default {
|
||||
@click="toggleEmojiPicker"
|
||||
/>
|
||||
<FileUpload
|
||||
v-if="allowFileUpload"
|
||||
ref="uploadRef"
|
||||
v-tooltip.top-end="$t('CONVERSATION.REPLYBOX.TIP_ATTACH_ICON')"
|
||||
input-id="conversationAttachment"
|
||||
|
||||
@@ -1245,6 +1245,7 @@ export default {
|
||||
allow-ai-assist
|
||||
allow-video-call
|
||||
allow-audio-recorder
|
||||
allow-file-upload
|
||||
@select-whatsapp-template="openWhatsappTemplateModal"
|
||||
@toggle-editor="toggleRichContentEditor"
|
||||
@replace-text="replaceText"
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user