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