@webitel/ui-chats 0.1.51 → 0.1.53
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/package.json
CHANGED
|
@@ -15,27 +15,27 @@ export function useChatMessageFile(
|
|
|
15
15
|
return fileRef.value?.streamUrl || fileRef.value?.url;
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
const isMediaType = (value: string | undefined) => {
|
|
19
|
+
return !!(value?.includes('audio') || value?.includes('video'));
|
|
20
|
+
};
|
|
21
|
+
|
|
18
22
|
const image = computed(() => {
|
|
19
23
|
const isImage = fileType.value?.includes('image');
|
|
20
24
|
const isHEIC = fileType.value?.includes('heic');
|
|
21
25
|
|
|
22
26
|
if (isHEIC) return null;
|
|
23
27
|
|
|
24
|
-
return isImage
|
|
28
|
+
return isImage ? fileRef.value : null;
|
|
25
29
|
});
|
|
30
|
+
|
|
26
31
|
const media = computed(() => {
|
|
27
|
-
return (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
32
|
+
return isMediaType(fileType.value) || isMediaType(fileSrc.value)
|
|
33
|
+
? fileRef.value
|
|
34
|
+
: null;
|
|
31
35
|
});
|
|
32
36
|
|
|
33
|
-
const isMediaType = (value: string | undefined) => {
|
|
34
|
-
return !!(value?.includes('audio') || value?.includes('video'));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
37
|
const document = computed(() => {
|
|
38
|
-
return !media.value && !image.value
|
|
38
|
+
return !media.value && !image.value ? fileRef.value : null;
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
return {
|