@bcc-code/vue-bcc-chat-ui 5.2.10 → 5.3.0
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/vue-bcc-chat-ui.js +2398 -2389
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
- package/src/components/BccChatMessageList.vue +15 -0
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ import logger from "../chat/logger";
|
|
|
19
19
|
import { loggedIn } from "../chat/login";
|
|
20
20
|
import { watchAndApplyStyle } from "../chat/styleFix";
|
|
21
21
|
import { ChatInstance, ParticipantInfo } from "../chat/types";
|
|
22
|
+
import { offlineStore } from "../offline";
|
|
22
23
|
import { onlineMode, onlineStatus } from "../offline/connectivity";
|
|
23
24
|
import BccChatMessages from "./BccChatMessages.vue";
|
|
24
25
|
import BccScheduledMessages from "./BccScheduledMessages.vue";
|
|
@@ -39,6 +40,8 @@ const componentId = ref(
|
|
|
39
40
|
const chatGroup = ref<Group>();
|
|
40
41
|
const chatGroupNotFound = ref(false);
|
|
41
42
|
|
|
43
|
+
const isChatMessagesEmpty = ref(false);
|
|
44
|
+
|
|
42
45
|
const emit = defineEmits(['groupMembersFetched']);
|
|
43
46
|
const groupMembers = ref<ParticipantInfo[]>();
|
|
44
47
|
|
|
@@ -111,6 +114,15 @@ watch([loggedIn, chat.onlineStatus, () => props.chatUid, chat.initialized, () =>
|
|
|
111
114
|
localLoadMessageId.value = "";
|
|
112
115
|
}
|
|
113
116
|
|
|
117
|
+
if (offlineStore.getGroupMessages(_chatUid, {
|
|
118
|
+
per_page: 1,
|
|
119
|
+
affix: 'prepend'
|
|
120
|
+
}).total === 0) {
|
|
121
|
+
isChatMessagesEmpty.value = true;
|
|
122
|
+
} else {
|
|
123
|
+
isChatMessagesEmpty.value = false;
|
|
124
|
+
}
|
|
125
|
+
|
|
114
126
|
if (chatGroup.value) {
|
|
115
127
|
|
|
116
128
|
let isChannel = (chatGroup.value.getMetadata() as any).isChannel;
|
|
@@ -286,6 +298,9 @@ function closeScheduledMessage() {
|
|
|
286
298
|
<div v-else class="bcc-chat-message-list-offline">
|
|
287
299
|
<span>Loading...</span>
|
|
288
300
|
</div>
|
|
301
|
+
<div v-if="isChatMessagesEmpty" class="bcc-chat-message-list-offline">
|
|
302
|
+
<span>No messages has been sent</span>
|
|
303
|
+
</div>
|
|
289
304
|
</div>
|
|
290
305
|
</template>
|
|
291
306
|
|