Merge branch 'release/4.9.1'

This commit is contained in:
Sojan Jose
2025-12-22 18:56:05 -08:00
8 changed files with 39 additions and 24 deletions

View File

@@ -1 +1 @@
4.8.0
4.9.1

View File

@@ -171,10 +171,13 @@ const onPaste = e => {
const files = e.clipboardData?.files;
if (!files?.length) return;
Array.from(files).forEach(file => {
const { name, type, size } = file;
onFileUpload({ file, name, type, size });
});
// Filter valid files (non-zero size)
Array.from(files)
.filter(file => file.size > 0)
.forEach(file => {
const { name, type, size } = file;
onFileUpload({ file, name, type, size });
});
};
useEventListener(document, 'paste', onPaste);

View File

@@ -676,11 +676,18 @@ function createEditorView() {
typingIndicator.stop();
emit('blur');
},
paste: (_view, event) => {
paste: (view, event) => {
if (props.disabled) return;
const data = event.clipboardData.files;
if (data.length > 0) {
event.preventDefault();
const { files } = event.clipboardData;
if (!files.length) return;
event.preventDefault();
// Paste text content alongside files (e.g., spreadsheet data from Numbers app)
// Numbers app includes invalid 0-byte attachments with text, so we paste the text here
// while ReplyBox filters and handles valid file attachments
const text = event.clipboardData.getData('text/plain');
if (text) {
view.dispatch(view.state.tr.insertText(text));
emitOnChange();
}
},
},

View File

@@ -692,20 +692,20 @@ export default {
},
onPaste(e) {
// Don't handle paste if compose new conversation modal is open
if (this.newConversationModalActive) {
return;
}
if (this.newConversationModalActive) return;
const data = e.clipboardData.files;
if (!this.showRichContentEditor && data.length !== 0) {
this.$refs.messageInput?.$el?.blur();
}
if (!data.length || !data[0]) {
return;
}
data.forEach(file => {
const { name, type, size } = file;
this.onFileUpload({ name, type, size, file: file });
});
// Filter valid files (non-zero size)
Array.from(e.clipboardData.files)
.filter(file => file.size > 0)
.forEach(file => {
const { name, type, size } = file;
this.onFileUpload({ name, type, size, file });
});
},
toggleUserMention(currentMentionState) {
this.showUserMentions = currentMentionState;

View File

@@ -150,8 +150,6 @@ const derivedAttributes = computed(() =>
<SettingsLayout
:is-loading="uiFlags.isFetching"
:loading-message="$t('ATTRIBUTES_MGMT.LOADING')"
:no-records-found="!attributes.length"
:no-records-message="$t('ATTRIBUTES_MGMT.LIST.EMPTY_RESULT.404')"
>
<template #header>
<BaseSettingsHeader
@@ -177,7 +175,7 @@ const derivedAttributes = computed(() =>
class="max-w-xl"
@tab-changed="onClickTabChange"
/>
<div class="grid gap-3">
<div v-if="derivedAttributes.length" class="grid gap-3">
<AttributeListItem
v-for="attribute in derivedAttributes"
:key="attribute.id"
@@ -187,6 +185,12 @@ const derivedAttributes = computed(() =>
@delete="handleDeleteAttribute"
/>
</div>
<p
v-else
class="flex-1 py-20 text-n-slate-12 flex items-center justify-center text-base"
>
{{ $t('ATTRIBUTES_MGMT.LIST.EMPTY_RESULT.404') }}
</p>
</div>
</template>
<AddAttribute

View File

@@ -1,5 +1,5 @@
shared: &shared
version: '4.9.0'
version: '4.9.1'
development:
<<: *shared

View File

@@ -18,6 +18,7 @@ class Enterprise::Billing::HandleStripeEventService
captain_integration
advanced_search_indexing
advanced_search
linear_integration
].freeze
# Additional features available starting with the Business plan

View File

@@ -1,6 +1,6 @@
{
"name": "@chatwoot/chatwoot",
"version": "4.9.0",
"version": "4.9.1",
"license": "MIT",
"scripts": {
"eslint": "eslint app/**/*.{js,vue}",