@weni/unnnic-system 3.12.3 → 3.12.4
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/CHANGELOG.md +8 -0
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +11 -0
- package/dist/{es-c19444c0.mjs → es-79dbffcf.mjs} +1 -1
- package/dist/{index-93b45359.mjs → index-d911b61f.mjs} +1697 -1680
- package/dist/locales/en.json.d.ts +3 -0
- package/dist/locales/es.json.d.ts +3 -0
- package/dist/locales/pt_br.json.d.ts +3 -0
- package/dist/{pt-br-23dc9ca6.mjs → pt-br-35b17364.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +1 -1
- package/dist/unnnic.umd.js +8 -8
- package/package.json +1 -1
- package/src/components/ChatsContact/ChatsContact.vue +15 -9
- package/src/components/ChatsUserAvatar/ChatsUserAvatar.vue +1 -1
- package/src/locales/en.json +3 -0
- package/src/locales/es.json +3 -0
- package/src/locales/pt_br.json +3 -0
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
:title="title"
|
|
43
43
|
:class="{ bold: unreadMessages }"
|
|
44
44
|
>
|
|
45
|
-
{{
|
|
45
|
+
{{ contactName }}
|
|
46
46
|
</h1>
|
|
47
47
|
|
|
48
48
|
<p
|
|
@@ -241,6 +241,16 @@ export default {
|
|
|
241
241
|
isHovered: false,
|
|
242
242
|
|
|
243
243
|
defaultTranslations: {
|
|
244
|
+
unnamed_contact: {
|
|
245
|
+
'pt-br': 'Contato sem nome',
|
|
246
|
+
en: 'Unnamed contact',
|
|
247
|
+
es: 'Contacto sin nombre',
|
|
248
|
+
},
|
|
249
|
+
yesterday: {
|
|
250
|
+
'pt-br': 'Ontem',
|
|
251
|
+
en: 'Yesterday',
|
|
252
|
+
es: 'Ayer',
|
|
253
|
+
},
|
|
244
254
|
waiting_for: {
|
|
245
255
|
'pt-br':
|
|
246
256
|
'Aguardando há 1 minuto | Aguardando há {waitingTime} minutos',
|
|
@@ -286,13 +296,6 @@ export default {
|
|
|
286
296
|
formattedLastInteraction() {
|
|
287
297
|
if (!this.lastInteractionTime) return '';
|
|
288
298
|
|
|
289
|
-
const yesterdayTranslationsMapper = {
|
|
290
|
-
en: 'Yesterday',
|
|
291
|
-
'pt-br': 'Ontem',
|
|
292
|
-
es: 'Ayer',
|
|
293
|
-
ayer: 'Ayer',
|
|
294
|
-
};
|
|
295
|
-
|
|
296
299
|
moment.locale(this.locale);
|
|
297
300
|
|
|
298
301
|
const now = moment();
|
|
@@ -300,7 +303,7 @@ export default {
|
|
|
300
303
|
const lastInteractionMoment = moment(this.lastInteractionTime);
|
|
301
304
|
|
|
302
305
|
if (now.subtract(1, 'day').isSame(lastInteractionMoment, 'day')) {
|
|
303
|
-
return
|
|
306
|
+
return this.i18n('yesterday');
|
|
304
307
|
}
|
|
305
308
|
|
|
306
309
|
if (now.diff(lastInteractionMoment, 'hours') > 0) {
|
|
@@ -343,6 +346,9 @@ export default {
|
|
|
343
346
|
|
|
344
347
|
return { isMedia, contentType, lastMessage, mediaIcon, mediaText };
|
|
345
348
|
},
|
|
349
|
+
contactName() {
|
|
350
|
+
return this.title?.trim() || `[${this.i18n('unnamed_contact')}]`;
|
|
351
|
+
},
|
|
346
352
|
subtitle() {
|
|
347
353
|
const { discussionGoal, lastMessage } = this;
|
|
348
354
|
return discussionGoal
|
package/src/locales/en.json
CHANGED
package/src/locales/es.json
CHANGED