Allow setting default text for media messages
This commit is contained in:
parent
a0109f93af
commit
b0fae3396d
2 changed files with 10 additions and 2 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
:batch="uploadBatch"
|
:batch="uploadBatch"
|
||||||
v-on:close="closeFileMode"
|
v-on:close="closeFileMode"
|
||||||
:showBackButton="false"
|
:showBackButton="false"
|
||||||
|
:defaultRootMessageText="$t('file_mode.files')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-if="!useVoiceMode && !useFileModeNonAdmin" :class="{'chat-content': true, 'flex-grow-1': true, 'flex-shrink-1': true, 'invisible': !initialLoadDone}" ref="chatContainer"
|
<div v-if="!useVoiceMode && !useFileModeNonAdmin" :class="{'chat-content': true, 'flex-grow-1': true, 'flex-shrink-1': true, 'invisible': !initialLoadDone}" ref="chatContainer"
|
||||||
|
|
@ -316,7 +317,6 @@ import MessageOperationsBottomSheet from "./MessageOperationsBottomSheet";
|
||||||
import StickerPickerBottomSheet from "./StickerPickerBottomSheet";
|
import StickerPickerBottomSheet from "./StickerPickerBottomSheet";
|
||||||
import UserProfileDialog from "./UserProfileDialog.vue"
|
import UserProfileDialog from "./UserProfileDialog.vue"
|
||||||
import BottomSheet from "./BottomSheet.vue";
|
import BottomSheet from "./BottomSheet.vue";
|
||||||
import imageResize from "image-resize";
|
|
||||||
import CreatePollDialog from "./CreatePollDialog.vue";
|
import CreatePollDialog from "./CreatePollDialog.vue";
|
||||||
import chatMixin, { ROOM_READ_MARKER_EVENT_PLACEHOLDER } from "./chatMixin";
|
import chatMixin, { ROOM_READ_MARKER_EVENT_PLACEHOLDER } from "./chatMixin";
|
||||||
import AudioLayout from "./AudioLayout.vue";
|
import AudioLayout from "./AudioLayout.vue";
|
||||||
|
|
|
||||||
|
|
@ -206,12 +206,20 @@ export default defineComponent({
|
||||||
components: { C2PABadge, AttachmentInfo },
|
components: { C2PABadge, AttachmentInfo },
|
||||||
emits: ["pick-file", "close"],
|
emits: ["pick-file", "close"],
|
||||||
props: {
|
props: {
|
||||||
|
defaultRootMessageText: {
|
||||||
|
type: String,
|
||||||
|
default: function () {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
showBackButton: {
|
showBackButton: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: function () {
|
default: function () {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
batch: {
|
batch: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function () {
|
default: function () {
|
||||||
|
|
@ -295,7 +303,7 @@ export default defineComponent({
|
||||||
sendAll() {
|
sendAll() {
|
||||||
this.status = this.mainStatuses.SENDING;
|
this.status = this.mainStatuses.SENDING;
|
||||||
this.batch
|
this.batch
|
||||||
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.$t("file_mode.files"))
|
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.defaultRootMessageText)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.status = this.mainStatuses.SENT;
|
this.status = this.mainStatuses.SENT;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue