Make sure file mode works
This commit is contained in:
parent
ce6398685f
commit
06ad4ca644
5 changed files with 14 additions and 14 deletions
|
|
@ -368,7 +368,7 @@ $hiliteColor: #4642f1;
|
||||||
|
|
||||||
.file-drop-sending-container {
|
.file-drop-sending-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 13px 0px 15px 0px;
|
padding: 13px 10px 15px 10px;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
@ -435,6 +435,7 @@ $hiliteColor: #4642f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-drop-sending-input-container {
|
.file-drop-sending-input-container {
|
||||||
|
padding: 10px;
|
||||||
.v-btn {
|
.v-btn {
|
||||||
.v-progress-circular {
|
.v-progress-circular {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
|
@ -457,16 +458,13 @@ $hiliteColor: #4642f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-drop-sent-input-container {
|
.file-drop-sent-input-container {
|
||||||
|
padding: 10px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
.v-btn {
|
.v-btn {
|
||||||
right: unset;
|
|
||||||
left: 8px;
|
left: 8px;
|
||||||
background: linear-gradient(0deg, #000 0%, #000 100%), #4642f1;
|
|
||||||
|
|
||||||
&.close {
|
|
||||||
right: 8px;
|
right: 8px;
|
||||||
left: unset;
|
&.close {
|
||||||
background: $hiliteColor !important;
|
background: $hiliteColor !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
v-on:add-files="(files) => addAttachments(files)"
|
v-on:add-files="(files) => addAttachments(files)"
|
||||||
:batch="uploadBatch"
|
:batch="uploadBatch"
|
||||||
v-on:close="closeFileMode"
|
v-on:close="closeFileMode"
|
||||||
:showBackButton="false"
|
:fileModeMode="true"
|
||||||
:defaultRootMessageText="$t('file_mode.files')"
|
:defaultRootMessageText="$t('file_mode.files')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-bind="{ ...$attrs }" class="send-attachments">
|
<div v-bind="{ ...$attrs }" class="send-attachments">
|
||||||
<v-btn
|
<v-btn
|
||||||
v-if="showBackButton"
|
v-if="!fileModeMode"
|
||||||
class="back-button clickable"
|
class="back-button clickable"
|
||||||
icon="arrow_back"
|
icon="arrow_back"
|
||||||
size="default"
|
size="default"
|
||||||
|
|
@ -229,10 +229,10 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
showBackButton: {
|
fileModeMode: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: function () {
|
default: function () {
|
||||||
return true;
|
return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -323,7 +323,9 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
sendAll() {
|
sendAll() {
|
||||||
this.status = this.mainStatuses.SENDING;
|
this.status = this.mainStatuses.SENDING;
|
||||||
|
if (!this.fileModeMode) {
|
||||||
this.$emit("close");
|
this.$emit("close");
|
||||||
|
}
|
||||||
this.batch
|
this.batch
|
||||||
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.defaultRootMessageText)
|
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.defaultRootMessageText)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,11 @@ import { Attachment } from "../../models/attachment";
|
||||||
import ImageWithProgress from "../ImageWithProgress.vue";
|
import ImageWithProgress from "../ImageWithProgress.vue";
|
||||||
|
|
||||||
function isEventAttachment(source: EventAttachment | Attachment | undefined): source is EventAttachment {
|
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 {
|
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");
|
const $$sanitize: any = inject("globalSanitize");
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export const useThumbnail = (source: KeanuEvent | File | undefined) => {
|
||||||
const fileSize = ref("");
|
const fileSize = ref("");
|
||||||
|
|
||||||
function isEvent(source: KeanuEvent | File | undefined): source is KeanuEvent {
|
function isEvent(source: KeanuEvent | File | undefined): source is KeanuEvent {
|
||||||
return (source as KeanuEvent).getId !== undefined;
|
return (source as KeanuEvent)?.getId !== undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isEvent(source)) {
|
if (isEvent(source)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue