@mobilon-dev/chotto 0.3.120 → 0.3.123
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_feed_elements/DeletedMessageContent/icons → 1_icons}/DeletedMessageIcon.vue.js +1 -1
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +2 -2
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +197 -194
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -4
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +1 -1
- package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
- package/dist/components/3_compounds/Feed/Feed.vue2.js +126 -117
- package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +19 -17
- package/dist/types/src/apps/data/chats.d.ts +9 -2
- package/dist/types/src/components/2_chatlist_elements/ChatItem/stories/ChatItem.stories.d.ts +1 -0
- package/dist/types/src/components/2_chatlist_elements/ChatItem/types.d.ts +2 -0
- package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/types/src/components/{2_feed_elements/DeletedMessageContent/icons → 1_icons}/DeletedMessageIcon.vue.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as t, openBlock as o, createElementVNode as n } from "vue";
|
|
2
|
-
import r from "
|
|
2
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
const C = {}, l = {
|
|
4
4
|
width: "16",
|
|
5
5
|
height: "16",
|
|
@@ -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-3d817d5e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getStatus as
|
|
1
|
+
import { defineComponent as Ft, inject as Pt, useId as Rt, ref as E, computed as l, watch as Wt, onMounted as $t, nextTick as P, onUnmounted as jt, createElementBlock as a, openBlock as o, createElementVNode as m, createCommentVNode as c, withModifiers as Xt, normalizeClass as R, normalizeStyle as ot, createVNode as W, createBlock as d, renderSlot as Yt, withCtx as $, toDisplayString as f, resolveDynamicComponent as at, unref as h, Teleport as Ot, Fragment as zt, renderList as qt } from "vue";
|
|
2
|
+
import { getStatus as Gt, statuses as Jt } from "../../../functions/getStatusMessage.js";
|
|
3
3
|
import "../../../functions/parseMarkdown.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import { resolveMessageDraftStore as
|
|
6
|
-
import { useTheme as
|
|
7
|
-
import { useEmojiNative as
|
|
4
|
+
import { t as S } from "../../../locale/useLocale.js";
|
|
5
|
+
import { resolveMessageDraftStore as Kt } from "../../../hooks/useMessageDraft.js";
|
|
6
|
+
import { useTheme as Qt } from "../../../hooks/useTheme.js";
|
|
7
|
+
import { useEmojiNative as Zt } from "../../../hooks/useEmojiNative.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
12
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
13
|
-
import { textToAppleEmojiHtml as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
|
|
13
|
+
import { textToAppleEmojiHtml as j, textContainsEmoji as st } from "../../../functions/renderAppleEmojis.js";
|
|
14
|
+
import ct from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
15
|
+
import te from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
|
|
16
|
+
import ee from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
17
|
+
import ne from "../../1_icons/AvatarIcon.vue.js";
|
|
18
|
+
import ie from "../../1_icons/VerifiedBadge.vue.js";
|
|
19
|
+
import oe from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
20
|
+
import ae from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
21
|
+
import se from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
|
|
22
|
+
import ce from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
|
|
23
|
+
import re from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
|
|
24
|
+
import rt from "./icons/AudioIcon.vue.js";
|
|
25
|
+
import X from "./icons/FileIcon.vue.js";
|
|
26
|
+
import lt from "./icons/ImageIcon.vue.js";
|
|
27
|
+
import le from "./icons/MissedCallIcon.vue.js";
|
|
28
|
+
import Y from "./icons/StickerIcon.vue.js";
|
|
29
|
+
import ut from "./icons/VideoIcon.vue.js";
|
|
30
|
+
import mt from "./icons/VoiceIcon.vue.js";
|
|
31
|
+
import ue from "../../1_icons/DeletedMessageIcon.vue.js";
|
|
32
|
+
const me = ["data-chat-id"], de = { class: "chat-item__avatar-container" }, he = ["src"], fe = {
|
|
32
33
|
key: 1,
|
|
33
34
|
class: "chat-item__avatar-placeholder"
|
|
34
|
-
},
|
|
35
|
+
}, ve = { class: "chat-item__info-container" }, ge = { class: "chat-item__title-row" }, ye = ["innerHTML"], pe = {
|
|
35
36
|
key: 1,
|
|
36
37
|
class: "chat-item__name"
|
|
37
|
-
},
|
|
38
|
+
}, _e = {
|
|
38
39
|
key: 0,
|
|
39
40
|
class: "chat-item__last-message"
|
|
40
|
-
},
|
|
41
|
+
}, xe = {
|
|
41
42
|
key: 1,
|
|
42
43
|
class: "chat-item__last-message-text chat-item__last-message-text--draft"
|
|
43
|
-
},
|
|
44
|
+
}, ke = { class: "chat-item__draft-label" }, we = ["innerHTML"], Ce = {
|
|
44
45
|
key: 2,
|
|
45
46
|
class: "chat-item__draft-text"
|
|
46
|
-
},
|
|
47
|
+
}, Ie = ["innerHTML"], Te = {
|
|
47
48
|
key: 3,
|
|
48
49
|
class: "chat-item__last-message-text"
|
|
49
|
-
},
|
|
50
|
+
}, Me = { class: "chat-item__details-container" }, Ee = {
|
|
50
51
|
key: 0,
|
|
51
52
|
class: "chat-item__time"
|
|
52
|
-
},
|
|
53
|
+
}, Se = { class: "chat-item__status-unread-container" }, Le = {
|
|
53
54
|
key: 1,
|
|
54
55
|
class: "chat-item__unread"
|
|
55
|
-
},
|
|
56
|
+
}, be = {
|
|
56
57
|
key: 2,
|
|
57
58
|
class: "chat-item__status-chat-container"
|
|
58
|
-
},
|
|
59
|
+
}, Ae = {
|
|
59
60
|
key: 0,
|
|
60
61
|
class: "chat-item__fixed pi pi-thumbtack"
|
|
61
|
-
},
|
|
62
|
+
}, Be = {
|
|
62
63
|
key: 0,
|
|
63
64
|
id: "noSelectButton",
|
|
64
65
|
class: "chat-item__menu-button"
|
|
65
|
-
},
|
|
66
|
+
}, De = {
|
|
66
67
|
key: 1,
|
|
67
68
|
id: "noSelectButton",
|
|
68
69
|
class: "chat-item__menu-button"
|
|
69
|
-
},
|
|
70
|
+
}, Ve = {
|
|
70
71
|
key: 0,
|
|
71
72
|
class: "dialog__container"
|
|
72
|
-
},
|
|
73
|
+
}, He = ["onClick"], Ne = ["src"], Ue = {
|
|
73
74
|
key: 1,
|
|
74
75
|
class: "dialog__icon pi pi-user"
|
|
75
|
-
},
|
|
76
|
+
}, Fe = { class: "dialog__text-container" }, Pe = { class: "dialog__name" }, Re = { class: "dialog__time" }, _n = /* @__PURE__ */ Ft({
|
|
76
77
|
__name: "ChatItem",
|
|
77
78
|
props: {
|
|
78
79
|
chat: {},
|
|
@@ -80,31 +81,31 @@ const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le =
|
|
|
80
81
|
contextMenuTrigger: { default: "hover" }
|
|
81
82
|
},
|
|
82
83
|
emits: ["select", "action", "expand"],
|
|
83
|
-
setup(s, { emit:
|
|
84
|
-
const
|
|
84
|
+
setup(s, { emit: dt }) {
|
|
85
|
+
const L = Pt("chatAppId"), { getTheme: O } = Qt(L), { isNative: z, emojiSrc: B } = Zt(L), ht = Kt(String(L ?? "")), e = s, b = dt, y = Rt(), p = E(!1), x = E(!1), D = E(!1), ft = E(null), k = l(
|
|
85
86
|
() => {
|
|
86
87
|
var t;
|
|
87
|
-
return (((t =
|
|
88
|
+
return (((t = e.chat.actions) == null ? void 0 : t.length) ?? 0) > 0;
|
|
88
89
|
}
|
|
89
|
-
),
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
90
|
+
), vt = () => {
|
|
91
|
+
D.value = !0;
|
|
92
|
+
}, gt = (t) => {
|
|
93
|
+
D.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && b("select", { chat: e.chat, dialog: null }), D.value = !1;
|
|
94
|
+
}, yt = (t) => {
|
|
95
|
+
b("select", { chat: e.chat, dialog: t });
|
|
96
|
+
}, pt = () => e.chat.isSelected ? "chat-item__selected" : "", _t = (t) => t.isSelected ? "dialog__selected" : "", q = (t) => {
|
|
97
|
+
e.contextMenuTrigger === "rightClick" && V(), b("action", { chat: e.chat, ...t });
|
|
98
|
+
}, V = () => {
|
|
98
99
|
const t = document.getElementById("context-menu-rightclick-" + y);
|
|
99
|
-
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"),
|
|
100
|
-
},
|
|
101
|
-
document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((
|
|
102
|
-
const i =
|
|
100
|
+
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), x.value = !1;
|
|
101
|
+
}, xt = () => {
|
|
102
|
+
document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
|
|
103
|
+
const i = n;
|
|
103
104
|
i.id !== "context-menu-rightclick-" + y && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
|
|
104
105
|
});
|
|
105
|
-
},
|
|
106
|
-
let
|
|
107
|
-
const _ = E(0),
|
|
106
|
+
}, kt = () => 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)) : [], wt = l(() => Gt(e.chat["lastMessage.status"])), Ct = l(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), It = l(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
|
|
107
|
+
let A;
|
|
108
|
+
const _ = E(0), G = [S("component.ChatItem.typing") + ".", S("component.ChatItem.typing") + "..", S("component.ChatItem.typing") + "..."], Tt = S("component.DeletedMessageContent.text"), H = (t) => typeof t != "string" && (t == null ? void 0 : t.deleted) === !0, J = (t) => {
|
|
108
109
|
var u, r, v;
|
|
109
110
|
if (typeof t == "string")
|
|
110
111
|
return t;
|
|
@@ -114,239 +115,241 @@ const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le =
|
|
|
114
115
|
return (t.isVoiceMessage || ((u = t == null ? void 0 : t.data) == null ? void 0 : u.isVoiceMessage)) === !0 ? "Голосовое сообщение" : "Аудиофайл";
|
|
115
116
|
if ((t == null ? void 0 : t.type) === "message.missedCall")
|
|
116
117
|
return "Пропущенный звонок";
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
return
|
|
118
|
+
const n = (r = t == null ? void 0 : t.data) == null ? void 0 : r.text;
|
|
119
|
+
if (n)
|
|
120
|
+
return n;
|
|
120
121
|
const i = (v = t == null ? void 0 : t.data) == null ? void 0 : v.filename;
|
|
121
122
|
return i || "";
|
|
122
|
-
},
|
|
123
|
-
var
|
|
124
|
-
const t =
|
|
125
|
-
if (!(!t || t.edit) && !(!t.listPreviewText && !t.listPreviewFile) && !(!(t.text || "").trim() && !t.file && !((
|
|
123
|
+
}, K = (t) => H(t) ? Tt : J(t), Mt = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, N = S("component.ChatItem.draft"), U = l(() => {
|
|
124
|
+
var n;
|
|
125
|
+
const t = ht.getChatDraft(String(L ?? ""), e.chat.chatId);
|
|
126
|
+
if (!(!t || t.edit) && !(!t.listPreviewText && !t.listPreviewFile) && !(!(t.text || "").trim() && !t.file && !((n = t.files) != null && n.length)))
|
|
126
127
|
return t;
|
|
127
|
-
}), w = l(() => !!
|
|
128
|
-
var
|
|
129
|
-
const t =
|
|
130
|
-
return t ? t.file ? (((
|
|
131
|
-
}),
|
|
132
|
-
const t =
|
|
128
|
+
}), w = l(() => !!U.value), g = l(() => {
|
|
129
|
+
var n;
|
|
130
|
+
const t = U.value;
|
|
131
|
+
return t ? t.file ? (((n = t.listPreviewFile) == null ? void 0 : n.name) || t.file.name || "").trim() : (t.listPreviewText || "").trim() : "";
|
|
132
|
+
}), Q = l(() => {
|
|
133
|
+
const t = U.value;
|
|
133
134
|
if (!(t != null && t.file)) return null;
|
|
134
|
-
const
|
|
135
|
-
return i === "sticker" || u.endsWith(".tgs") || u.endsWith(".webp") ?
|
|
136
|
-
}),
|
|
137
|
-
var
|
|
138
|
-
if (
|
|
135
|
+
const n = t.listPreviewFile, i = ((n == null ? void 0 : n.type) || t.file.type || "").toLowerCase(), u = ((n == null ? void 0 : n.name) || t.file.name || "").toLowerCase();
|
|
136
|
+
return i === "sticker" || u.endsWith(".tgs") || u.endsWith(".webp") ? Y : i === "image" || i.includes("image") ? lt : i === "video" || i.includes("video") ? ut : i === "audio" || i.includes("audio") ? u.includes("voice") || u.includes("голос") ? mt : rt : i === "file" || u ? X : X;
|
|
137
|
+
}), Et = l(() => j(g.value || "", null, B.value)), Z = l(() => {
|
|
138
|
+
var n, i, u;
|
|
139
|
+
if (e.chat.typing || w.value)
|
|
139
140
|
return null;
|
|
140
|
-
|
|
141
|
+
if (H(e.chat.lastMessage))
|
|
142
|
+
return ue;
|
|
143
|
+
const t = Mt(e.chat.lastMessage);
|
|
141
144
|
if (!t)
|
|
142
145
|
return null;
|
|
143
146
|
if (t === "message.sticker")
|
|
144
|
-
return
|
|
147
|
+
return Y;
|
|
145
148
|
if (t === "message.image")
|
|
146
|
-
return
|
|
149
|
+
return lt;
|
|
147
150
|
if (t === "message.video")
|
|
148
|
-
return
|
|
151
|
+
return ut;
|
|
149
152
|
if (t === "message.audio") {
|
|
150
|
-
const r =
|
|
151
|
-
return (r.isVoiceMessage || ((
|
|
153
|
+
const r = e.chat.lastMessage;
|
|
154
|
+
return (r.isVoiceMessage || ((n = r == null ? void 0 : r.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? mt : rt;
|
|
152
155
|
}
|
|
153
156
|
if (t === "message.missedCall")
|
|
154
|
-
return
|
|
157
|
+
return le;
|
|
155
158
|
if (t === "message.file") {
|
|
156
|
-
const r =
|
|
157
|
-
return v.endsWith(".tgs") || v.endsWith(".webp") ?
|
|
159
|
+
const r = e.chat.lastMessage, v = ((u = (i = r == null ? void 0 : r.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
|
|
160
|
+
return v.endsWith(".tgs") || v.endsWith(".webp") ? Y : X;
|
|
158
161
|
}
|
|
159
162
|
return null;
|
|
160
|
-
}),
|
|
161
|
-
() => !z.value &&
|
|
162
|
-
),
|
|
163
|
-
() => !z.value &&
|
|
164
|
-
),
|
|
165
|
-
|
|
166
|
-
() =>
|
|
163
|
+
}), St = l(() => e.chat.typing ? G[_.value] : w.value ? g.value ? `${N} ${g.value}` : N : H(e.chat.lastMessage) ? J(e.chat.lastMessage) : K(e.chat.lastMessage)), F = l(() => e.chat.typing ? G[_.value] : K(e.chat.lastMessage)), tt = l(
|
|
164
|
+
() => !z.value && st(g.value || F.value || "")
|
|
165
|
+
), Lt = l(
|
|
166
|
+
() => !z.value && st(e.chat.name || "")
|
|
167
|
+
), bt = l(() => j(F.value || "", null, B.value)), At = l(() => j(e.chat.name || "", null, B.value));
|
|
168
|
+
Wt(
|
|
169
|
+
() => e.chat.typing,
|
|
167
170
|
() => {
|
|
168
|
-
|
|
171
|
+
e.chat.typing ? A = setInterval(() => {
|
|
169
172
|
_.value < 2 ? _.value += 1 : _.value = 0;
|
|
170
|
-
}, 1e3) : (_.value = 0,
|
|
173
|
+
}, 1e3) : (_.value = 0, A && (clearInterval(A), A = void 0));
|
|
171
174
|
},
|
|
172
175
|
{ immediate: !0 }
|
|
173
176
|
);
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
177
|
+
const Bt = () => {
|
|
178
|
+
e.contextMenuTrigger === "hover" && k.value && (p.value = !0);
|
|
179
|
+
}, Dt = (t) => {
|
|
180
|
+
e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? p.value = !0 : p.value = !1);
|
|
181
|
+
}, Vt = (t) => {
|
|
182
|
+
e.contextMenuTrigger === "rightClick" && k.value && Ht(t);
|
|
183
|
+
}, Ht = (t) => {
|
|
184
|
+
xt(), x.value = !0, P(() => {
|
|
185
|
+
const n = document.getElementById("context-menu-rightclick-" + y);
|
|
186
|
+
if (n) {
|
|
184
187
|
const i = t.clientX, u = t.clientY;
|
|
185
|
-
|
|
186
|
-
const r =
|
|
187
|
-
|
|
188
|
-
const v = window.innerWidth,
|
|
188
|
+
n.style.display = "inherit";
|
|
189
|
+
const r = n.getBoundingClientRect();
|
|
190
|
+
n.style.display = "none", P(() => {
|
|
191
|
+
const v = window.innerWidth, it = window.innerHeight, C = window.scrollX || window.pageXOffset, I = window.scrollY || window.pageYOffset;
|
|
189
192
|
let T = i + C, M = u + I;
|
|
190
|
-
T + r.width > v + C && (T = i + C - r.width), M + r.height >
|
|
193
|
+
T + r.width > v + C && (T = i + C - r.width), M + r.height > it + I && (M = u + I - r.height), T < C && (T = C), M < I && (M = I), n.style.top = M + "px", n.style.left = T + "px", n.style.opacity = "1", n.style.display = "inherit";
|
|
191
194
|
});
|
|
192
195
|
}
|
|
193
196
|
});
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
if (
|
|
198
|
-
const
|
|
199
|
-
(!i || !i.contains(
|
|
197
|
+
}, Nt = () => {
|
|
198
|
+
}, Ut = () => {
|
|
199
|
+
}, et = (t) => {
|
|
200
|
+
if (e.contextMenuTrigger === "rightClick" && x.value) {
|
|
201
|
+
const n = t.target, i = document.getElementById("context-menu-rightclick-" + y);
|
|
202
|
+
(!i || !i.contains(n)) && V();
|
|
200
203
|
}
|
|
201
|
-
},
|
|
202
|
-
|
|
204
|
+
}, nt = () => {
|
|
205
|
+
e.contextMenuTrigger === "rightClick" && x.value && V();
|
|
203
206
|
};
|
|
204
|
-
return
|
|
205
|
-
|
|
207
|
+
return $t(() => {
|
|
208
|
+
e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", et), window.addEventListener("scroll", nt, !0), P(() => {
|
|
206
209
|
const t = document.getElementById("context-menu-rightclick-" + y);
|
|
207
210
|
t && (t.style.display = "none", t.style.opacity = "0");
|
|
208
211
|
}));
|
|
209
|
-
}),
|
|
210
|
-
document.removeEventListener("click",
|
|
211
|
-
}), (t,
|
|
212
|
+
}), jt(() => {
|
|
213
|
+
document.removeEventListener("click", et), window.removeEventListener("scroll", nt, !0);
|
|
214
|
+
}), (t, n) => (o(), a("div", null, [
|
|
212
215
|
m("div", {
|
|
213
216
|
ref_key: "containerRef",
|
|
214
|
-
ref:
|
|
215
|
-
class:
|
|
217
|
+
ref: ft,
|
|
218
|
+
class: R(["chat-item__container", pt()]),
|
|
216
219
|
"data-testid": "chat-item",
|
|
217
|
-
"data-chat-id":
|
|
218
|
-
onMouseenter:
|
|
219
|
-
onMouseleave:
|
|
220
|
-
onClick:
|
|
221
|
-
onContextmenu:
|
|
220
|
+
"data-chat-id": e.chat.chatId,
|
|
221
|
+
onMouseenter: Bt,
|
|
222
|
+
onMouseleave: Dt,
|
|
223
|
+
onClick: gt,
|
|
224
|
+
onContextmenu: Xt(Vt, ["prevent"])
|
|
222
225
|
}, [
|
|
223
|
-
m("div",
|
|
226
|
+
m("div", de, [
|
|
224
227
|
m("span", {
|
|
225
228
|
class: "chat-item__status-user",
|
|
226
|
-
style:
|
|
229
|
+
style: ot({ backgroundColor: e.chat.status })
|
|
227
230
|
}, null, 4),
|
|
228
|
-
|
|
231
|
+
e.chat.avatar ? (o(), a("img", {
|
|
229
232
|
key: 0,
|
|
230
|
-
src:
|
|
233
|
+
src: e.chat.avatar,
|
|
231
234
|
height: "48",
|
|
232
235
|
width: "48"
|
|
233
|
-
}, null, 8,
|
|
234
|
-
|
|
236
|
+
}, null, 8, he)) : (o(), a("div", fe, [
|
|
237
|
+
W(ne)
|
|
235
238
|
]))
|
|
236
239
|
]),
|
|
237
|
-
m("div",
|
|
238
|
-
m("div",
|
|
239
|
-
|
|
240
|
+
m("div", ve, [
|
|
241
|
+
m("div", ge, [
|
|
242
|
+
W(ct, {
|
|
240
243
|
text: s.chat.name,
|
|
241
244
|
position: "bottom"
|
|
242
245
|
}, {
|
|
243
|
-
default:
|
|
244
|
-
|
|
246
|
+
default: $(() => [
|
|
247
|
+
Lt.value ? (o(), a("div", {
|
|
245
248
|
key: 0,
|
|
246
249
|
class: "chat-item__name",
|
|
247
|
-
innerHTML:
|
|
248
|
-
}, null, 8,
|
|
250
|
+
innerHTML: At.value
|
|
251
|
+
}, null, 8, ye)) : (o(), a("div", pe, f(s.chat.name), 1))
|
|
249
252
|
]),
|
|
250
253
|
_: 1
|
|
251
254
|
}, 8, ["text"]),
|
|
252
|
-
s.chat.verified ? (o(), d(
|
|
253
|
-
|
|
255
|
+
s.chat.verified ? (o(), d(ie, { key: 0 })) : c("", !0),
|
|
256
|
+
Yt(t.$slots, "name-suffix", {}, void 0, !0)
|
|
254
257
|
]),
|
|
255
|
-
|
|
256
|
-
text:
|
|
258
|
+
W(ct, {
|
|
259
|
+
text: St.value,
|
|
257
260
|
position: "bottom"
|
|
258
261
|
}, {
|
|
259
|
-
default:
|
|
260
|
-
s.chat.lastMessage || s.chat.typing || w.value ? (o(), a("div",
|
|
261
|
-
|
|
262
|
+
default: $(() => [
|
|
263
|
+
s.chat.lastMessage || s.chat.typing || w.value ? (o(), a("div", _e, [
|
|
264
|
+
Z.value && !w.value ? (o(), d(at(Z.value), {
|
|
262
265
|
key: 0,
|
|
263
266
|
class: "chat-item__message-icon"
|
|
264
267
|
})) : c("", !0),
|
|
265
|
-
w.value ? (o(), a("span",
|
|
266
|
-
m("span",
|
|
267
|
-
|
|
268
|
+
w.value ? (o(), a("span", xe, [
|
|
269
|
+
m("span", ke, f(h(N)), 1),
|
|
270
|
+
Q.value ? (o(), d(at(Q.value), {
|
|
268
271
|
key: 0,
|
|
269
272
|
class: "chat-item__message-icon"
|
|
270
273
|
})) : c("", !0),
|
|
271
|
-
g.value &&
|
|
274
|
+
g.value && tt.value ? (o(), a("span", {
|
|
272
275
|
key: 1,
|
|
273
276
|
class: "chat-item__draft-text",
|
|
274
|
-
innerHTML:
|
|
275
|
-
}, null, 8,
|
|
276
|
-
])) :
|
|
277
|
+
innerHTML: Et.value
|
|
278
|
+
}, null, 8, we)) : g.value ? (o(), a("span", Ce, f(g.value), 1)) : c("", !0)
|
|
279
|
+
])) : tt.value ? (o(), a("span", {
|
|
277
280
|
key: 2,
|
|
278
281
|
class: "chat-item__last-message-text",
|
|
279
|
-
innerHTML:
|
|
280
|
-
}, null, 8,
|
|
282
|
+
innerHTML: bt.value
|
|
283
|
+
}, null, 8, Ie)) : (o(), a("span", Te, f(F.value), 1))
|
|
281
284
|
])) : c("", !0)
|
|
282
285
|
]),
|
|
283
286
|
_: 1
|
|
284
287
|
}, 8, ["text"])
|
|
285
288
|
]),
|
|
286
|
-
m("div",
|
|
287
|
-
s.chat["lastActivity.time"] && (!
|
|
288
|
-
p.value &&
|
|
289
|
+
m("div", Me, [
|
|
290
|
+
s.chat["lastActivity.time"] && (!k.value || !p.value) ? (o(), a("div", Ee, f(s.chat["lastActivity.time"]), 1)) : c("", !0),
|
|
291
|
+
p.value && k.value && s.contextMenuTrigger === "hover" ? (o(), d(te, {
|
|
289
292
|
key: 1,
|
|
290
293
|
mode: "click",
|
|
291
294
|
"menu-side": "bottom-right",
|
|
292
295
|
actions: s.chat.actions,
|
|
293
|
-
onClick:
|
|
294
|
-
onButtonClick:
|
|
295
|
-
onMenuMouseLeave:
|
|
296
|
+
onClick: q,
|
|
297
|
+
onButtonClick: vt,
|
|
298
|
+
onMenuMouseLeave: n[0] || (n[0] = (i) => p.value = !1)
|
|
296
299
|
}, {
|
|
297
|
-
default:
|
|
300
|
+
default: $(() => [...n[2] || (n[2] = [
|
|
298
301
|
m("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
|
|
299
302
|
])]),
|
|
300
303
|
_: 1
|
|
301
304
|
}, 8, ["actions"])) : c("", !0),
|
|
302
|
-
(o(), d(
|
|
303
|
-
s.contextMenuTrigger === "rightClick" &&
|
|
305
|
+
(o(), d(Ot, { to: "body" }, [
|
|
306
|
+
s.contextMenuTrigger === "rightClick" && k.value && x.value ? (o(), d(ee, {
|
|
304
307
|
key: 0,
|
|
305
308
|
id: "context-menu-rightclick-" + h(y),
|
|
306
309
|
actions: s.chat.actions,
|
|
307
|
-
"data-theme": h(
|
|
308
|
-
onClick:
|
|
309
|
-
onMouseenter:
|
|
310
|
-
onMouseleave:
|
|
310
|
+
"data-theme": h(O)().theme ? h(O)().theme : "light",
|
|
311
|
+
onClick: q,
|
|
312
|
+
onMouseenter: Nt,
|
|
313
|
+
onMouseleave: Ut
|
|
311
314
|
}, null, 8, ["id", "actions", "data-theme"])) : c("", !0)
|
|
312
315
|
])),
|
|
313
|
-
m("div",
|
|
314
|
-
h(
|
|
316
|
+
m("div", Se, [
|
|
317
|
+
h(Jt).includes(s.chat["lastMessage.status"]) ? (o(), a("div", {
|
|
315
318
|
key: 0,
|
|
316
|
-
class:
|
|
319
|
+
class: R(["chat-item__status-message", wt.value])
|
|
317
320
|
}, [
|
|
318
|
-
s.chat["lastMessage.status"] === "pending" ? (o(), d(h(
|
|
321
|
+
s.chat["lastMessage.status"] === "pending" ? (o(), d(h(ae), { key: 0 })) : s.chat["lastMessage.status"] === "error" ? (o(), d(h(oe), { key: 1 })) : s.chat["lastMessage.status"] === "read" ? (o(), d(h(se), { key: 2 })) : s.chat["lastMessage.status"] === "received" ? (o(), d(h(ce), { key: 3 })) : (o(), d(h(re), { key: 4 }))
|
|
319
322
|
], 2)) : c("", !0),
|
|
320
|
-
|
|
323
|
+
Ct.value ? (o(), a("div", Le, f(It.value), 1)) : c("", !0)
|
|
321
324
|
]),
|
|
322
|
-
s.chat.countUnread < 1 ? (o(), a("div",
|
|
323
|
-
s.chat.isFixedTop || s.chat.isFixedBottom ? (o(), a("span",
|
|
325
|
+
s.chat.countUnread < 1 ? (o(), a("div", be, [
|
|
326
|
+
s.chat.isFixedTop || s.chat.isFixedBottom ? (o(), a("span", Ae)) : c("", !0)
|
|
324
327
|
])) : c("", !0)
|
|
325
328
|
]),
|
|
326
|
-
|
|
329
|
+
e.showDialogs && s.chat.dialogs ? (o(), a("div", {
|
|
327
330
|
key: 0,
|
|
328
331
|
class: "chat-item__dialog-buttons",
|
|
329
|
-
onClick:
|
|
332
|
+
onClick: n[1] || (n[1] = (i) => b("expand", e.chat))
|
|
330
333
|
}, [
|
|
331
|
-
|
|
334
|
+
e.showDialogs && !s.chat.dialogsExpanded ? (o(), a("button", Be, [...n[3] || (n[3] = [
|
|
332
335
|
m("span", {
|
|
333
336
|
id: "noSelectButton",
|
|
334
337
|
class: "pi pi-angle-down"
|
|
335
338
|
}, null, -1)
|
|
336
339
|
])])) : c("", !0),
|
|
337
|
-
|
|
340
|
+
e.showDialogs && s.chat.dialogsExpanded ? (o(), a("button", De, [...n[4] || (n[4] = [
|
|
338
341
|
m("span", {
|
|
339
342
|
id: "noSelectButton",
|
|
340
343
|
class: "pi pi-angle-up"
|
|
341
344
|
}, null, -1)
|
|
342
345
|
])])) : c("", !0)
|
|
343
346
|
])) : c("", !0)
|
|
344
|
-
], 42,
|
|
345
|
-
|
|
346
|
-
(o(!0), a(
|
|
347
|
+
], 42, me),
|
|
348
|
+
e.showDialogs && s.chat.dialogsExpanded ? (o(), a("div", Ve, [
|
|
349
|
+
(o(!0), a(zt, null, qt(kt(), (i) => (o(), a("div", {
|
|
347
350
|
key: i.dialogId,
|
|
348
|
-
class:
|
|
349
|
-
onClick: (u) =>
|
|
351
|
+
class: R(["dialog__item", _t(i)]),
|
|
352
|
+
onClick: (u) => yt(i)
|
|
350
353
|
}, [
|
|
351
354
|
i.icon ? (o(), a("img", {
|
|
352
355
|
key: 0,
|
|
@@ -354,21 +357,21 @@ const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le =
|
|
|
354
357
|
src: i.icon,
|
|
355
358
|
height: "16",
|
|
356
359
|
width: "16"
|
|
357
|
-
}, null, 8,
|
|
358
|
-
m("div",
|
|
359
|
-
m("div",
|
|
360
|
-
m("div",
|
|
360
|
+
}, null, 8, Ne)) : (o(), a("span", Ue)),
|
|
361
|
+
m("div", Fe, [
|
|
362
|
+
m("div", Pe, f(i.name), 1),
|
|
363
|
+
m("div", Re, f(i["lastActivity.time"]), 1)
|
|
361
364
|
]),
|
|
362
365
|
i.countUnread > 0 ? (o(), a("div", {
|
|
363
366
|
key: 2,
|
|
364
367
|
class: "chat-item__unread",
|
|
365
|
-
style:
|
|
368
|
+
style: ot(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
|
|
366
369
|
}, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : c("", !0)
|
|
367
|
-
], 10,
|
|
370
|
+
], 10, He))), 128))
|
|
368
371
|
])) : c("", !0)
|
|
369
372
|
]));
|
|
370
373
|
}
|
|
371
374
|
});
|
|
372
375
|
export {
|
|
373
|
-
|
|
376
|
+
_n as default
|
|
374
377
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./DeletedMessageContent.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ t(e, [["__scopeId", "data-v-ecf8bbc1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as u, computed as c, createBlock as f, createElementBlock as n, openBlock as t, withCtx as i, createElementVNode as o, createVNode as d, toDisplayString as s, createCommentVNode as m } from "vue";
|
|
2
2
|
import { useLocale as h } from "../../../locale/useLocale.js";
|
|
3
3
|
import x from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
4
|
-
import r from "
|
|
4
|
+
import r from "../../1_icons/DeletedMessageIcon.vue.js";
|
|
5
5
|
const y = { class: "deleted-message-content__tooltip" }, b = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "deleted-message-content__tooltip-original"
|