- {{
- useInstallationName(
- $t('NETWORK.NOTIFICATION.TEXT'),
- globalConfig.installationName
- )
- }}
-
+
+
+
+ {{ $t('NETWORK.NOTIFICATION.OFFLINE') }}
+
+
@@ -47,7 +56,12 @@ export default {
mounted() {
window.addEventListener('offline', this.updateOnlineStatus);
window.bus.$on(BUS_EVENTS.WEBSOCKET_DISCONNECT, () => {
- this.updateOnlineStatus({ type: 'offline' });
+ // TODO: Remove this after completing the conversation list refetching
+ // TODO: DIRTY FIX : CLEAN UP THIS WITH PROPER FIX, DELAYING THE RECONNECT FOR NOW
+ // THE CABLE IS FIRING IS VERY COMMON AND THUS INTERFERING USER EXPERIENCE
+ setTimeout(() => {
+ this.updateOnlineStatus({ type: 'offline' });
+ }, 4000);
});
},
@@ -72,33 +86,3 @@ export default {
},
};
-
-
diff --git a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue
index 33bca2e68..625fda78e 100644
--- a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue
+++ b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue
@@ -84,7 +84,10 @@ import {
import eventListenerMixins from 'shared/mixins/eventListenerMixins';
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
-import { replaceVariablesInMessage } from '@chatwoot/utils';
+import {
+ replaceVariablesInMessage,
+ createTypingIndicator,
+} from '@chatwoot/utils';
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
import { checkFileSizeLimit } from 'shared/helpers/FileHelper';
import { uploadFile } from 'dashboard/helper/uploadHelper';
@@ -140,6 +143,15 @@ export default {
},
data() {
return {
+ typingIndicator: createTypingIndicator(
+ () => {
+ this.$emit('typing-on');
+ },
+ () => {
+ this.$emit('typing-off');
+ },
+ TYPING_INDICATOR_IDLE_TIME
+ ),
showUserMentions: false,
showCannedMenu: false,
showVariables: false,
@@ -638,15 +650,6 @@ export default {
hideMentions() {
this.showUserMentions = false;
},
- resetTyping() {
- this.$emit('typing-off');
- this.idleTimer = null;
- },
- turnOffIdleTimer() {
- if (this.idleTimer) {
- clearTimeout(this.idleTimer);
- }
- },
handleLineBreakWhenEnterToSendEnabled(event) {
if (
hasPressedEnterAndNotCmdOrShift(event) &&
@@ -666,14 +669,7 @@ export default {
}
},
onKeyup() {
- if (!this.idleTimer) {
- this.$emit('typing-on');
- }
- this.turnOffIdleTimer();
- this.idleTimer = setTimeout(
- () => this.resetTyping(),
- TYPING_INDICATOR_IDLE_TIME
- );
+ this.typingIndicator.start();
this.updateImgToolbarOnDelete();
},
onKeydown(event) {
@@ -685,8 +681,7 @@ export default {
}
},
onBlur() {
- this.turnOffIdleTimer();
- this.resetTyping();
+ this.typingIndicator.stop();
this.$emit('blur');
},
onFocus() {
diff --git a/app/javascript/dashboard/components/widgets/conversation/CannedResponse.vue b/app/javascript/dashboard/components/widgets/conversation/CannedResponse.vue
index 93c9af736..c744eaa06 100644
--- a/app/javascript/dashboard/components/widgets/conversation/CannedResponse.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/CannedResponse.vue
@@ -1,5 +1,9 @@
-
+
{{ item.label }} - {{ item.description }}
diff --git a/app/javascript/dashboard/components/widgets/conversation/Message.vue b/app/javascript/dashboard/components/widgets/conversation/Message.vue
index 34ad5f59f..8eb03137b 100644
--- a/app/javascript/dashboard/components/widgets/conversation/Message.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/Message.vue
@@ -29,8 +29,19 @@
:message-type="data.message_type"
:parent-has-attachments="hasAttachments"
/>
+
+
+ {{ $t('CONVERSATION.UNSUPPORTED_MESSAGE_INSTAGRAM') }}
+
+
+ {{ $t('CONVERSATION.UNSUPPORTED_MESSAGE_FACEBOOK') }}
+
+
+ {{ $t('CONVERSATION.UNSUPPORTED_MESSAGE') }}
+
+
.bubble {
@apply min-w-[128px];
+ &.is-unsupported {
+ @apply text-xs max-w-[300px] border-dashed border border-slate-200 text-slate-600 dark:text-slate-200 bg-slate-50 dark:bg-slate-700 dark:border-slate-500;
+
+ .message-text--metadata .time {
+ @apply text-slate-400 dark:text-slate-300;
+ }
+ }
+
&.is-image,
&.is-video {
@apply p-0 overflow-hidden;
@@ -544,10 +572,12 @@ export default {
> video {
@apply rounded-lg;
}
+
> video {
@apply h-full w-full object-cover;
}
}
+
.video {
@apply h-[11.25rem];
}
@@ -562,9 +592,11 @@ export default {
.file--icon {
@apply text-woot-400 dark:text-woot-400;
}
+
.text-block-title {
@apply text-slate-700 dark:text-slate-700;
}
+
.download.button {
@apply text-woot-400 dark:text-woot-400;
}
@@ -573,6 +605,7 @@ export default {
&.is-private.is-text > .message-text__wrap .link {
@apply text-woot-600 dark:text-woot-200;
}
+
&.is-private.is-text > .message-text__wrap .prosemirror-mention-node {
@apply font-bold bg-none rounded-sm p-0 bg-yellow-100 dark:bg-yellow-700 text-slate-700 dark:text-slate-25 underline;
}
@@ -583,6 +616,7 @@ export default {
.message-text--metadata .time {
@apply text-violet-50 dark:text-violet-50;
}
+
&.is-private .message-text--metadata .time {
@apply text-slate-400 dark:text-slate-400;
}
diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
index d9e255c6d..62eb6d739 100644
--- a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
@@ -32,6 +32,8 @@
:is-a-tweet="isATweet"
:is-a-whatsapp-channel="isAWhatsAppChannel"
:is-web-widget-inbox="isAWebWidgetInbox"
+ :is-a-facebook-inbox="isAFacebookInbox"
+ :is-instagram="isInstagramDM"
:inbox-supports-reply-to="inboxSupportsReplyTo"
:in-reply-to="getInReplyToMessage(message)"
/>
@@ -54,6 +56,8 @@
:is-a-tweet="isATweet"
:is-a-whatsapp-channel="isAWhatsAppChannel"
:is-web-widget-inbox="isAWebWidgetInbox"
+ :is-a-facebook-inbox="isAFacebookInbox"
+ :is-instagram-dm="isInstagramDM"
:inbox-supports-reply-to="inboxSupportsReplyTo"
:in-reply-to="getInReplyToMessage(message)"
/>
@@ -283,6 +287,9 @@ export default {
unreadMessageCount() {
return this.currentChat.unread_count || 0;
},
+ isInstagramDM() {
+ return this.conversationType === 'instagram_direct_message';
+ },
inboxSupportsReplyTo() {
const incoming = this.inboxHasFeature(INBOX_FEATURES.REPLY_TO);
const outgoing =
diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue
index 4199be673..e22a3a23a 100644
--- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue
@@ -271,6 +271,11 @@ export default {
accountId: 'getCurrentAccountId',
isFeatureEnabledonAccount: 'accounts/isFeatureEnabledonAccount',
}),
+ currentContact() {
+ return this.$store.getters['contacts/getContact'](
+ this.currentChat.meta.sender.id
+ );
+ },
shouldShowReplyToMessage() {
return (
this.inReplyTo?.id &&
@@ -509,6 +514,7 @@ export default {
messageVariables() {
const variables = getMessageVariables({
conversation: this.currentChat,
+ contact: this.currentContact,
});
return variables;
},
diff --git a/app/javascript/dashboard/components/widgets/conversation/VariableList.vue b/app/javascript/dashboard/components/widgets/conversation/VariableList.vue
index 6128abe43..48b1dcea3 100644
--- a/app/javascript/dashboard/components/widgets/conversation/VariableList.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/VariableList.vue
@@ -1,5 +1,10 @@
-
+
{{ item.description }}
@@ -10,6 +15,7 @@