@mobilon-dev/chotto 0.3.80 → 0.3.82
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/chotto.css +1 -1
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +7 -0
- package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ErrorStatusIcon.vue2.js +5 -5
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +7 -0
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +7 -0
- package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReadStatusIcon.vue2.js +1 -1
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +7 -0
- package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReceivedStatusIcon.vue2.js +9 -9
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +7 -0
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +1 -1
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +39 -38
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +2 -2
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +123 -122
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +2 -2
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +132 -139
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +5 -5
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +78 -77
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +2 -2
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +58 -58
- package/dist/functions/playNotificationAudio.js +4 -3
- package/dist/functions/safeMediaPlay.js +17 -0
- package/dist/index.js +234 -221
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/components/2_chatlist_elements/ChatItem/styles/types.d.ts +2 -4
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/functions/index.d.ts +1 -0
- package/dist/types/functions/safeMediaPlay.d.ts +3 -0
- package/package.json +1 -1
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/ErrorStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/PendingStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/ReadStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/ReceivedStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/SentStatusIcon.vue.js +0 -7
- /package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/PendingStatusIcon.vue2.js +0 -0
- /package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/SentStatusIcon.vue2.js +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ErrorStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/PendingStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReadStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReceivedStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/SentStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/index.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ht, inject as ft, useId as gt, ref as I, computed as p, watch as yt, onMounted as vt, nextTick as B, onUnmounted as pt, createElementBlock as s, openBlock as o, createElementVNode as r, createCommentVNode as l, withModifiers as kt, normalizeClass as b, normalizeStyle as W, createVNode as A, withCtx as V, toDisplayString as f, createBlock as m, resolveDynamicComponent as xt, Teleport as _t, unref as d, Fragment as Ct, renderList as wt } from "vue";
|
|
2
2
|
import { getStatus as It, statuses as Tt } from "../../../functions/getStatusMessage.js";
|
|
3
3
|
import "../../../functions/parseMarkdown.js";
|
|
4
4
|
import { t as U } from "../../../locale/useLocale.js";
|
|
@@ -9,59 +9,55 @@ import { useTheme as Mt } from "../../../hooks/useTheme.js";
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
11
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
12
|
-
import
|
|
12
|
+
import $ from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
13
13
|
import Et from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import Ut from "
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
14
|
+
import St from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
15
|
+
import Bt from "../../1_icons/AvatarIcon.vue.js";
|
|
16
|
+
import bt from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
17
|
+
import At from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
18
|
+
import Vt from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
|
|
19
|
+
import Ut from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
|
|
20
|
+
import Lt from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
|
|
21
|
+
import Dt from "./icons/AudioIcon.vue.js";
|
|
22
|
+
import Nt from "./icons/FileIcon.vue.js";
|
|
23
|
+
import Rt from "./icons/ImageIcon.vue.js";
|
|
24
|
+
import Xt from "./icons/MissedCallIcon.vue.js";
|
|
25
|
+
import z from "./icons/StickerIcon.vue.js";
|
|
26
|
+
import Yt from "./icons/VideoIcon.vue.js";
|
|
27
|
+
import Ft from "./icons/VoiceIcon.vue.js";
|
|
28
|
+
const Ht = { class: "chat-item__avatar-container" }, Wt = ["src"], $t = {
|
|
24
29
|
key: 1,
|
|
25
30
|
class: "chat-item__avatar-placeholder"
|
|
26
|
-
},
|
|
31
|
+
}, zt = { class: "chat-item__info-container" }, Ot = { class: "chat-item__name" }, qt = {
|
|
27
32
|
key: 0,
|
|
28
33
|
class: "chat-item__last-message"
|
|
29
|
-
},
|
|
34
|
+
}, Pt = { class: "chat-item__last-message-text" }, Gt = { class: "chat-item__details-container" }, Jt = {
|
|
30
35
|
key: 0,
|
|
31
36
|
class: "chat-item__time"
|
|
32
|
-
},
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "pi pi-clock"
|
|
35
|
-
}, Gt = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "pi pi-exclamation-circle"
|
|
38
|
-
}, Jt = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "pi pi-check"
|
|
41
|
-
}, Kt = {
|
|
37
|
+
}, Kt = { class: "chat-item__status-unread-container" }, Qt = {
|
|
42
38
|
key: 1,
|
|
43
39
|
class: "chat-item__unread"
|
|
44
|
-
},
|
|
40
|
+
}, Zt = {
|
|
45
41
|
key: 2,
|
|
46
42
|
class: "chat-item__status-chat-container"
|
|
47
|
-
},
|
|
43
|
+
}, jt = {
|
|
48
44
|
key: 0,
|
|
49
45
|
class: "chat-item__fixed pi pi-thumbtack"
|
|
50
|
-
},
|
|
46
|
+
}, te = {
|
|
51
47
|
key: 0,
|
|
52
48
|
id: "noSelectButton",
|
|
53
49
|
class: "chat-item__menu-button"
|
|
54
|
-
},
|
|
50
|
+
}, ee = {
|
|
55
51
|
key: 1,
|
|
56
52
|
id: "noSelectButton",
|
|
57
53
|
class: "chat-item__menu-button"
|
|
58
|
-
},
|
|
54
|
+
}, ne = {
|
|
59
55
|
key: 0,
|
|
60
56
|
class: "dialog__container"
|
|
61
|
-
},
|
|
57
|
+
}, ie = ["onClick"], oe = ["src"], ce = {
|
|
62
58
|
key: 1,
|
|
63
59
|
class: "dialog__icon pi pi-user"
|
|
64
|
-
},
|
|
60
|
+
}, se = { class: "dialog__text-container" }, ae = { class: "dialog__name" }, re = { class: "dialog__time" }, Ne = /* @__PURE__ */ ht({
|
|
65
61
|
__name: "ChatItem",
|
|
66
62
|
props: {
|
|
67
63
|
chat: {},
|
|
@@ -69,27 +65,27 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
69
65
|
contextMenuTrigger: { default: "hover" }
|
|
70
66
|
},
|
|
71
67
|
emits: ["select", "action", "expand"],
|
|
72
|
-
setup(c, { emit:
|
|
73
|
-
const
|
|
68
|
+
setup(c, { emit: O }) {
|
|
69
|
+
const q = ft("chatAppId"), { getTheme: L } = Mt(q), e = c, T = O, g = gt(), y = I(!1), k = I(!1), E = I(!1), P = I(null), G = () => {
|
|
74
70
|
E.value = !0;
|
|
75
|
-
},
|
|
76
|
-
E.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" &&
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
e.contextMenuTrigger === "rightClick" &&
|
|
81
|
-
},
|
|
82
|
-
const t = document.getElementById("context-menu-rightclick-" +
|
|
83
|
-
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"),
|
|
84
|
-
},
|
|
71
|
+
}, J = (t) => {
|
|
72
|
+
E.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && T("select", { chat: e.chat, dialog: null }), E.value = !1;
|
|
73
|
+
}, K = (t) => {
|
|
74
|
+
T("select", { chat: e.chat, dialog: t });
|
|
75
|
+
}, Q = () => e.chat.isSelected ? "chat-item__selected" : "", Z = (t) => t.isSelected ? "dialog__selected" : "", D = (t) => {
|
|
76
|
+
e.contextMenuTrigger === "rightClick" && S(), T("action", { chat: e.chat, ...t });
|
|
77
|
+
}, S = () => {
|
|
78
|
+
const t = document.getElementById("context-menu-rightclick-" + g);
|
|
79
|
+
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), k.value = !1;
|
|
80
|
+
}, j = () => {
|
|
85
81
|
document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
|
|
86
82
|
const i = n;
|
|
87
|
-
i.id !== "context-menu-rightclick-" +
|
|
83
|
+
i.id !== "context-menu-rightclick-" + g && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
|
|
88
84
|
});
|
|
89
|
-
},
|
|
90
|
-
let
|
|
91
|
-
const
|
|
92
|
-
var u, a,
|
|
85
|
+
}, tt = () => e.chat.dialogs ? [...e.chat.dialogs].sort((t, n) => Number(t["lastActivity.timestamp"]) > Number(n["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(n["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(n["lastActivity.timestamp"]), 0)) : [], et = p(() => It(e.chat["lastMessage.status"])), nt = p(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), it = p(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
|
|
86
|
+
let M;
|
|
87
|
+
const v = I(0), N = [U("component.ChatItem.typing") + ".", U("component.ChatItem.typing") + "..", U("component.ChatItem.typing") + "..."], R = (t) => {
|
|
88
|
+
var u, a, h;
|
|
93
89
|
if (typeof t == "string")
|
|
94
90
|
return t;
|
|
95
91
|
if ((t == null ? void 0 : t.type) === "message.sticker")
|
|
@@ -101,90 +97,90 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
101
97
|
const n = (a = t == null ? void 0 : t.data) == null ? void 0 : a.text;
|
|
102
98
|
if (n)
|
|
103
99
|
return n;
|
|
104
|
-
const i = (
|
|
100
|
+
const i = (h = t == null ? void 0 : t.data) == null ? void 0 : h.filename;
|
|
105
101
|
return i || "";
|
|
106
|
-
},
|
|
102
|
+
}, ot = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, X = p(() => {
|
|
107
103
|
var n, i, u;
|
|
108
104
|
if (e.chat.typing)
|
|
109
105
|
return null;
|
|
110
|
-
const t =
|
|
106
|
+
const t = ot(e.chat.lastMessage);
|
|
111
107
|
if (!t)
|
|
112
108
|
return null;
|
|
113
109
|
if (t === "message.sticker")
|
|
114
|
-
return
|
|
110
|
+
return z;
|
|
115
111
|
if (t === "message.image")
|
|
116
|
-
return
|
|
112
|
+
return Rt;
|
|
117
113
|
if (t === "message.video")
|
|
118
|
-
return
|
|
114
|
+
return Yt;
|
|
119
115
|
if (t === "message.audio") {
|
|
120
116
|
const a = e.chat.lastMessage;
|
|
121
|
-
return (a.isVoiceMessage || ((n = a == null ? void 0 : a.data) == null ? void 0 : n.isVoiceMessage)) === !0 ?
|
|
117
|
+
return (a.isVoiceMessage || ((n = a == null ? void 0 : a.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? Ft : Dt;
|
|
122
118
|
}
|
|
123
119
|
if (t === "message.missedCall")
|
|
124
|
-
return
|
|
120
|
+
return Xt;
|
|
125
121
|
if (t === "message.file") {
|
|
126
|
-
const a = e.chat.lastMessage,
|
|
127
|
-
return
|
|
122
|
+
const a = e.chat.lastMessage, h = ((u = (i = a == null ? void 0 : a.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
|
|
123
|
+
return h.endsWith(".tgs") || h.endsWith(".webp") ? z : Nt;
|
|
128
124
|
}
|
|
129
125
|
return null;
|
|
130
|
-
}),
|
|
131
|
-
|
|
126
|
+
}), ct = p(() => e.chat.typing ? N[v.value] : R(e.chat.lastMessage)), st = p(() => e.chat.typing ? N[v.value] : R(e.chat.lastMessage));
|
|
127
|
+
yt(
|
|
132
128
|
() => e.chat.typing,
|
|
133
129
|
() => {
|
|
134
|
-
e.chat.typing ?
|
|
135
|
-
|
|
136
|
-
}, 1e3) : (
|
|
130
|
+
e.chat.typing ? M = setInterval(() => {
|
|
131
|
+
v.value < 2 ? v.value += 1 : v.value = 0;
|
|
132
|
+
}, 1e3) : (v.value = 0, M && (clearInterval(M), M = void 0));
|
|
137
133
|
},
|
|
138
134
|
{ immediate: !0 }
|
|
139
135
|
);
|
|
140
|
-
const
|
|
141
|
-
e.contextMenuTrigger === "hover" && (
|
|
136
|
+
const at = () => {
|
|
137
|
+
e.contextMenuTrigger === "hover" && (y.value = !0);
|
|
138
|
+
}, rt = (t) => {
|
|
139
|
+
e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? y.value = !0 : y.value = !1);
|
|
142
140
|
}, lt = (t) => {
|
|
143
|
-
e.contextMenuTrigger === "
|
|
141
|
+
e.contextMenuTrigger === "rightClick" && e.chat.actions && ut(t);
|
|
144
142
|
}, ut = (t) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
tt(), p.value = !0, b(() => {
|
|
148
|
-
const n = document.getElementById("context-menu-rightclick-" + h);
|
|
143
|
+
j(), k.value = !0, B(() => {
|
|
144
|
+
const n = document.getElementById("context-menu-rightclick-" + g);
|
|
149
145
|
if (n) {
|
|
150
146
|
const i = t.clientX, u = t.clientY;
|
|
151
147
|
n.style.display = "inherit";
|
|
152
148
|
const a = n.getBoundingClientRect();
|
|
153
|
-
n.style.display = "none",
|
|
154
|
-
const
|
|
155
|
-
let
|
|
156
|
-
|
|
149
|
+
n.style.display = "none", B(() => {
|
|
150
|
+
const h = window.innerWidth, H = window.innerHeight, x = window.scrollX || window.pageXOffset, _ = window.scrollY || window.pageYOffset;
|
|
151
|
+
let C = i + x, w = u + _;
|
|
152
|
+
C + a.width > h + x && (C = i + x - a.width), w + a.height > H + _ && (w = u + _ - a.height), C < x && (C = x), w < _ && (w = _), n.style.top = w + "px", n.style.left = C + "px", n.style.opacity = "1", n.style.display = "inherit";
|
|
157
153
|
});
|
|
158
154
|
}
|
|
159
155
|
});
|
|
160
156
|
}, mt = () => {
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
if (e.contextMenuTrigger === "rightClick" &&
|
|
164
|
-
const n = t.target, i = document.getElementById("context-menu-rightclick-" +
|
|
165
|
-
(!i || !i.contains(n)) &&
|
|
157
|
+
}, dt = () => {
|
|
158
|
+
}, Y = (t) => {
|
|
159
|
+
if (e.contextMenuTrigger === "rightClick" && k.value) {
|
|
160
|
+
const n = t.target, i = document.getElementById("context-menu-rightclick-" + g);
|
|
161
|
+
(!i || !i.contains(n)) && S();
|
|
166
162
|
}
|
|
167
|
-
},
|
|
168
|
-
e.contextMenuTrigger === "rightClick" &&
|
|
163
|
+
}, F = () => {
|
|
164
|
+
e.contextMenuTrigger === "rightClick" && k.value && S();
|
|
169
165
|
};
|
|
170
166
|
return vt(() => {
|
|
171
|
-
e.contextMenuTrigger === "rightClick" && (document.addEventListener("click",
|
|
172
|
-
const t = document.getElementById("context-menu-rightclick-" +
|
|
167
|
+
e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", Y), window.addEventListener("scroll", F, !0), B(() => {
|
|
168
|
+
const t = document.getElementById("context-menu-rightclick-" + g);
|
|
173
169
|
t && (t.style.display = "none", t.style.opacity = "0");
|
|
174
170
|
}));
|
|
175
|
-
}),
|
|
176
|
-
document.removeEventListener("click",
|
|
171
|
+
}), pt(() => {
|
|
172
|
+
document.removeEventListener("click", Y), window.removeEventListener("scroll", F, !0);
|
|
177
173
|
}), (t, n) => (o(), s("div", null, [
|
|
178
174
|
r("div", {
|
|
179
175
|
ref_key: "containerRef",
|
|
180
|
-
ref:
|
|
181
|
-
class:
|
|
182
|
-
onMouseenter:
|
|
183
|
-
onMouseleave:
|
|
184
|
-
onClick:
|
|
185
|
-
onContextmenu:
|
|
176
|
+
ref: P,
|
|
177
|
+
class: b(["chat-item__container", Q()]),
|
|
178
|
+
onMouseenter: at,
|
|
179
|
+
onMouseleave: rt,
|
|
180
|
+
onClick: J,
|
|
181
|
+
onContextmenu: kt(lt, ["prevent"])
|
|
186
182
|
}, [
|
|
187
|
-
r("div",
|
|
183
|
+
r("div", Ht, [
|
|
188
184
|
r("span", {
|
|
189
185
|
class: "chat-item__status-user",
|
|
190
186
|
style: W({ backgroundColor: e.chat.status })
|
|
@@ -194,91 +190,88 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
194
190
|
src: e.chat.avatar,
|
|
195
191
|
height: "48",
|
|
196
192
|
width: "48"
|
|
197
|
-
}, null, 8,
|
|
198
|
-
|
|
193
|
+
}, null, 8, Wt)) : (o(), s("div", $t, [
|
|
194
|
+
A(Bt)
|
|
199
195
|
]))
|
|
200
196
|
]),
|
|
201
|
-
r("div",
|
|
202
|
-
|
|
197
|
+
r("div", zt, [
|
|
198
|
+
A($, {
|
|
203
199
|
text: c.chat.name,
|
|
204
200
|
position: "bottom"
|
|
205
201
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
r("div",
|
|
202
|
+
default: V(() => [
|
|
203
|
+
r("div", Ot, f(c.chat.name), 1)
|
|
208
204
|
]),
|
|
209
205
|
_: 1
|
|
210
206
|
}, 8, ["text"]),
|
|
211
|
-
|
|
212
|
-
text:
|
|
207
|
+
A($, {
|
|
208
|
+
text: ct.value,
|
|
213
209
|
position: "bottom"
|
|
214
210
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
c.chat.lastMessage || c.chat.typing ? (o(), s("div",
|
|
217
|
-
|
|
211
|
+
default: V(() => [
|
|
212
|
+
c.chat.lastMessage || c.chat.typing ? (o(), s("div", qt, [
|
|
213
|
+
X.value ? (o(), m(xt(X.value), {
|
|
218
214
|
key: 0,
|
|
219
215
|
class: "chat-item__message-icon"
|
|
220
216
|
})) : l("", !0),
|
|
221
|
-
r("span",
|
|
217
|
+
r("span", Pt, f(st.value), 1)
|
|
222
218
|
])) : l("", !0)
|
|
223
219
|
]),
|
|
224
220
|
_: 1
|
|
225
221
|
}, 8, ["text"])
|
|
226
222
|
]),
|
|
227
|
-
r("div",
|
|
228
|
-
c.chat["lastActivity.time"] && (!c.chat.actions || !
|
|
229
|
-
|
|
223
|
+
r("div", Gt, [
|
|
224
|
+
c.chat["lastActivity.time"] && (!c.chat.actions || !y.value) ? (o(), s("div", Jt, f(c.chat["lastActivity.time"]), 1)) : l("", !0),
|
|
225
|
+
y.value && c.chat.actions && c.contextMenuTrigger === "hover" ? (o(), m(Et, {
|
|
230
226
|
key: 1,
|
|
231
227
|
mode: "click",
|
|
232
228
|
"menu-side": "bottom-right",
|
|
233
229
|
actions: c.chat.actions,
|
|
234
230
|
onClick: D,
|
|
235
|
-
onButtonClick:
|
|
236
|
-
onMenuMouseLeave: n[0] || (n[0] = (i) =>
|
|
231
|
+
onButtonClick: G,
|
|
232
|
+
onMenuMouseLeave: n[0] || (n[0] = (i) => y.value = !1)
|
|
237
233
|
}, {
|
|
238
|
-
default:
|
|
234
|
+
default: V(() => [...n[2] || (n[2] = [
|
|
239
235
|
r("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
|
|
240
236
|
])]),
|
|
241
237
|
_: 1
|
|
242
238
|
}, 8, ["actions"])) : l("", !0),
|
|
243
|
-
(o(),
|
|
244
|
-
c.contextMenuTrigger === "rightClick" && c.chat.actions &&
|
|
239
|
+
(o(), m(_t, { to: "body" }, [
|
|
240
|
+
c.contextMenuTrigger === "rightClick" && c.chat.actions && k.value ? (o(), m(St, {
|
|
245
241
|
key: 0,
|
|
246
|
-
id: "context-menu-rightclick-" +
|
|
242
|
+
id: "context-menu-rightclick-" + d(g),
|
|
247
243
|
actions: c.chat.actions,
|
|
248
|
-
"data-theme":
|
|
244
|
+
"data-theme": d(L)().theme ? d(L)().theme : "light",
|
|
249
245
|
onClick: D,
|
|
250
246
|
onMouseenter: mt,
|
|
251
|
-
onMouseleave:
|
|
247
|
+
onMouseleave: dt
|
|
252
248
|
}, null, 8, ["id", "actions", "data-theme"])) : l("", !0)
|
|
253
249
|
])),
|
|
254
|
-
r("div",
|
|
255
|
-
|
|
250
|
+
r("div", Kt, [
|
|
251
|
+
d(Tt).includes(c.chat["lastMessage.status"]) ? (o(), s("div", {
|
|
256
252
|
key: 0,
|
|
257
|
-
class:
|
|
253
|
+
class: b(["chat-item__status-message", et.value])
|
|
258
254
|
}, [
|
|
259
|
-
c.chat["lastMessage.status"] === "pending" ? (o(),
|
|
260
|
-
c.chat["lastMessage.status"] !== "sent" ? (o(), s("span", Jt)) : l("", !0),
|
|
261
|
-
n[3] || (n[3] = r("span", { class: "pi pi-check" }, null, -1))
|
|
262
|
-
], 64))
|
|
255
|
+
c.chat["lastMessage.status"] === "pending" ? (o(), m(d(At), { key: 0 })) : c.chat["lastMessage.status"] === "error" ? (o(), m(d(bt), { key: 1 })) : c.chat["lastMessage.status"] === "read" ? (o(), m(d(Vt), { key: 2 })) : c.chat["lastMessage.status"] === "received" ? (o(), m(d(Ut), { key: 3 })) : (o(), m(d(Lt), { key: 4 }))
|
|
263
256
|
], 2)) : l("", !0),
|
|
264
|
-
|
|
257
|
+
nt.value ? (o(), s("div", Qt, f(it.value), 1)) : l("", !0)
|
|
265
258
|
]),
|
|
266
|
-
c.chat.countUnread < 1 ? (o(), s("div",
|
|
267
|
-
c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span",
|
|
259
|
+
c.chat.countUnread < 1 ? (o(), s("div", Zt, [
|
|
260
|
+
c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span", jt)) : l("", !0)
|
|
268
261
|
])) : l("", !0)
|
|
269
262
|
]),
|
|
270
263
|
e.showDialogs && c.chat.dialogs ? (o(), s("div", {
|
|
271
264
|
key: 0,
|
|
272
265
|
class: "chat-item__dialog-buttons",
|
|
273
|
-
onClick: n[1] || (n[1] = (i) =>
|
|
266
|
+
onClick: n[1] || (n[1] = (i) => T("expand", e.chat))
|
|
274
267
|
}, [
|
|
275
|
-
e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button",
|
|
268
|
+
e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button", te, [...n[3] || (n[3] = [
|
|
276
269
|
r("span", {
|
|
277
270
|
id: "noSelectButton",
|
|
278
271
|
class: "pi pi-angle-down"
|
|
279
272
|
}, null, -1)
|
|
280
273
|
])])) : l("", !0),
|
|
281
|
-
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button",
|
|
274
|
+
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button", ee, [...n[4] || (n[4] = [
|
|
282
275
|
r("span", {
|
|
283
276
|
id: "noSelectButton",
|
|
284
277
|
class: "pi pi-angle-up"
|
|
@@ -286,11 +279,11 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
286
279
|
])])) : l("", !0)
|
|
287
280
|
])) : l("", !0)
|
|
288
281
|
], 34),
|
|
289
|
-
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div",
|
|
290
|
-
(o(!0), s(
|
|
282
|
+
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div", ne, [
|
|
283
|
+
(o(!0), s(Ct, null, wt(tt(), (i) => (o(), s("div", {
|
|
291
284
|
key: i.dialogId,
|
|
292
|
-
class:
|
|
293
|
-
onClick: (u) =>
|
|
285
|
+
class: b(["dialog__item", Z(i)]),
|
|
286
|
+
onClick: (u) => K(i)
|
|
294
287
|
}, [
|
|
295
288
|
i.icon ? (o(), s("img", {
|
|
296
289
|
key: 0,
|
|
@@ -298,21 +291,21 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
298
291
|
src: i.icon,
|
|
299
292
|
height: "16",
|
|
300
293
|
width: "16"
|
|
301
|
-
}, null, 8,
|
|
302
|
-
r("div",
|
|
303
|
-
r("div",
|
|
304
|
-
r("div",
|
|
294
|
+
}, null, 8, oe)) : (o(), s("span", ce)),
|
|
295
|
+
r("div", se, [
|
|
296
|
+
r("div", ae, f(i.name), 1),
|
|
297
|
+
r("div", re, f(i["lastActivity.time"]), 1)
|
|
305
298
|
]),
|
|
306
299
|
i.countUnread > 0 ? (o(), s("div", {
|
|
307
300
|
key: 2,
|
|
308
301
|
class: "chat-item__unread",
|
|
309
302
|
style: W(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
|
|
310
|
-
},
|
|
311
|
-
], 10,
|
|
303
|
+
}, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : l("", !0)
|
|
304
|
+
], 10, ie))), 128))
|
|
312
305
|
])) : l("", !0)
|
|
313
306
|
]));
|
|
314
307
|
}
|
|
315
308
|
});
|
|
316
309
|
export {
|
|
317
|
-
|
|
310
|
+
Ne as default
|
|
318
311
|
};
|
package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./MessageStatusIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-c70e671a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js
CHANGED
|
@@ -2,11 +2,11 @@ import { defineComponent as m, computed as i, createBlock as s, createCommentVNo
|
|
|
2
2
|
import p from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
3
3
|
import { statuses as S } from "../../../functions/getStatusMessage.js";
|
|
4
4
|
import "../../../functions/parseMarkdown.js";
|
|
5
|
-
import f from "
|
|
6
|
-
import y from "
|
|
7
|
-
import C from "
|
|
8
|
-
import k from "
|
|
9
|
-
import I from "
|
|
5
|
+
import f from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
6
|
+
import y from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
7
|
+
import C from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
|
|
8
|
+
import k from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
|
|
9
|
+
import I from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
|
|
10
10
|
const M = /* @__PURE__ */ m({
|
|
11
11
|
name: "MessageStatusIndicator",
|
|
12
12
|
__name: "MessageStatusIndicator",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./VideoMessage.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-dce5c529"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|