Make sure file mode works
This commit is contained in:
parent
ce6398685f
commit
06ad4ca644
5 changed files with 14 additions and 14 deletions
|
|
@ -35,7 +35,7 @@
|
|||
v-on:add-files="(files) => addAttachments(files)"
|
||||
:batch="uploadBatch"
|
||||
v-on:close="closeFileMode"
|
||||
:showBackButton="false"
|
||||
:fileModeMode="true"
|
||||
:defaultRootMessageText="$t('file_mode.files')"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div v-bind="{ ...$attrs }" class="send-attachments">
|
||||
<v-btn
|
||||
v-if="showBackButton"
|
||||
v-if="!fileModeMode"
|
||||
class="back-button clickable"
|
||||
icon="arrow_back"
|
||||
size="default"
|
||||
|
|
@ -229,10 +229,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
showBackButton: {
|
||||
fileModeMode: {
|
||||
type: Boolean,
|
||||
default: function () {
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -323,7 +323,9 @@ export default defineComponent({
|
|||
},
|
||||
sendAll() {
|
||||
this.status = this.mainStatuses.SENDING;
|
||||
this.$emit("close");
|
||||
if (!this.fileModeMode) {
|
||||
this.$emit("close");
|
||||
}
|
||||
this.batch
|
||||
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.defaultRootMessageText)
|
||||
.then(() => {
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ import { Attachment } from "../../models/attachment";
|
|||
import ImageWithProgress from "../ImageWithProgress.vue";
|
||||
|
||||
function isEventAttachment(source: EventAttachment | Attachment | undefined): source is EventAttachment {
|
||||
return (source as EventAttachment).event !== undefined;
|
||||
return (source as EventAttachment)?.event !== undefined;
|
||||
}
|
||||
|
||||
function isAttachment(source: EventAttachment | Attachment | undefined): source is Attachment {
|
||||
return (source as Attachment).file !== undefined;
|
||||
return (source as Attachment)?.file !== undefined;
|
||||
}
|
||||
|
||||
const $$sanitize: any = inject("globalSanitize");
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export const useThumbnail = (source: KeanuEvent | File | undefined) => {
|
|||
const fileSize = ref("");
|
||||
|
||||
function isEvent(source: KeanuEvent | File | undefined): source is KeanuEvent {
|
||||
return (source as KeanuEvent).getId !== undefined;
|
||||
return (source as KeanuEvent)?.getId !== undefined;
|
||||
}
|
||||
|
||||
if (isEvent(source)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue