@bcc-code/vue-bcc-chat-ui 3.0.0-alpha.7 → 3.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/connection.d.ts +2 -0
- package/dist/chat/index.d.ts +1 -0
- package/dist/vue-bcc-chat-ui.js +4184 -4155
- package/package.json +1 -1
- package/src/components/BccChatMessageList.vue +16 -1
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ import { loggedIn } from "../chat/login";
|
|
|
13
13
|
import { CometChatMessages } from "@cometchat/chat-uikit-vue";
|
|
14
14
|
import { Group } from "@cometchat/chat-sdk-javascript";
|
|
15
15
|
import { watchAndApplyStyle } from "../chat/styleFix";
|
|
16
|
+
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
16
17
|
import {
|
|
17
18
|
messageComposerConfiguration,
|
|
18
19
|
messageListConfiguration,
|
|
@@ -57,6 +58,7 @@ watchEffect(() => {
|
|
|
57
58
|
})
|
|
58
59
|
|
|
59
60
|
async function tryConnect(force: boolean) {
|
|
61
|
+
console.log('CONNECTING::::');
|
|
60
62
|
if (chat.onlineStatus.value === "online" || force) {
|
|
61
63
|
await connect(componentId.value);
|
|
62
64
|
}
|
|
@@ -117,10 +119,23 @@ onUnmounted(async () => {
|
|
|
117
119
|
await disconnect(componentId.value);
|
|
118
120
|
});
|
|
119
121
|
|
|
122
|
+
const cometChatStatus = ref('');
|
|
123
|
+
function getCometChatStatus(){
|
|
124
|
+
cometChatStatus.value = new Date().getTime() + CometChat.getConnectionStatus();
|
|
125
|
+
}
|
|
126
|
+
|
|
120
127
|
</script>
|
|
121
128
|
|
|
122
129
|
<template>
|
|
123
130
|
<div class="bcc-chat-message-list-wrapper">
|
|
131
|
+
<div>
|
|
132
|
+
<div>Connecting... <button @click="tryConnect(true)">[retry]</button></div>
|
|
133
|
+
<div>Online status: {{chat.onlineStatus}}</div>
|
|
134
|
+
<div>Online mode: {{chat.onlineMode}}</div>
|
|
135
|
+
<div>Connected: {{chat.connected.value}}</div>
|
|
136
|
+
<div>Connecting: {{chat.connecting.value}}</div>
|
|
137
|
+
<div>CometChat: {{cometChatStatus}} <button @click="getCometChatStatus()">[refresh]</button></div>
|
|
138
|
+
</div>
|
|
124
139
|
<div v-if="showChat" class="bcc-chat-message-list">
|
|
125
140
|
|
|
126
141
|
<CometChatMessages
|
|
@@ -140,7 +155,7 @@ onUnmounted(async () => {
|
|
|
140
155
|
</div>
|
|
141
156
|
</div>
|
|
142
157
|
<div v-else-if="!chat.connected.value" class="bcc-chat-message-list-offline">
|
|
143
|
-
<span>Connecting
|
|
158
|
+
<span>Connecting... <button @click="tryConnect(true)">[retry]</button></span>
|
|
144
159
|
</div>
|
|
145
160
|
<div v-else-if="!chatGroup" class="bcc-chat-message-list-offline">
|
|
146
161
|
<span>Loading chat...</span>
|