@chat21/chat21-ionic 3.0.94 → 3.0.96-rc.1
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/.github/workflows/docker-community-push-latest.yml +1 -1
- package/.github/workflows/docker-image-tag-community-tag-push.yml +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/app/app.module.ts +4 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +18 -15
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +0 -7
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +0 -15
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +11 -2
- package/src/app/chatlib/conversation-detail/message/text/text.component.scss +8 -3
- package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.html +1 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +7 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +1 -1
- package/src/app/components/navbar/navbar.component.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +39 -25
- package/src/app/services/websocket/websocket.service.ts +3 -3
- package/src/assets/i18n/ar.json +1 -0
- package/src/assets/i18n/az.json +1 -0
- package/src/assets/i18n/de.json +1 -0
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/i18n/es.json +1 -0
- package/src/assets/i18n/fr.json +1 -0
- package/src/assets/i18n/it.json +1 -0
- package/src/assets/i18n/kk.json +1 -0
- package/src/assets/i18n/pt.json +1 -0
- package/src/assets/i18n/ru.json +1 -0
- package/src/assets/i18n/sr.json +1 -0
- package/src/assets/i18n/sv.json +1 -0
- package/src/assets/i18n/tr.json +1 -0
- package/src/assets/i18n/uk.json +1 -0
- package/src/assets/i18n/uz.json +1 -0
- package/src/chat21-core/providers/abstract/archivedconversations-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/conversation-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +6 -7
- package/src/chat21-core/providers/abstract/groups-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/messagingAuth.service.ts +2 -2
- package/src/chat21-core/providers/abstract/presence.service.ts +3 -2
- package/src/chat21-core/providers/abstract/typing.service.ts +2 -2
- package/src/chat21-core/providers/abstract/upload.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +2 -13
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +1 -11
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +4 -3
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -34
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +0 -6
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +0 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +2 -12
- package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +25 -19
- package/src/chat21-core/providers/mqtt/mqtt-typing.service.ts +0 -2
- package/src/chat21-core/providers/native/native-upload-service.ts +1 -0
- package/src/chat21-core/utils/utils-message.ts +69 -16
- package/src/chat21-core/utils/utils.ts +97 -97
|
@@ -147,80 +147,80 @@ export function removeHtmlTags(text) {
|
|
|
147
147
|
* ieri;
|
|
148
148
|
* giorno della settimana (lunedì, martedì, ecc)
|
|
149
149
|
*/
|
|
150
|
-
export function setHeaderDate_old(translate, timestamp, lastDate?): string {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
150
|
+
// export function setHeaderDate_old(translate, timestamp, lastDate?): string {
|
|
151
|
+
// var date = new Date(timestamp);
|
|
152
|
+
// let now: Date = new Date();
|
|
153
|
+
// var LABEL_TODAY;// = translate.get('LABEL_TODAY')['value'];
|
|
154
|
+
// var LABEL_TOMORROW;// = translate.get('LABEL_TOMORROW')['value'];
|
|
155
|
+
// translate.get('LABEL_TODAY').subscribe((res: string) => {
|
|
156
|
+
// LABEL_TODAY = res;
|
|
157
|
+
// });
|
|
158
|
+
// translate.get('LABEL_TOMORROW').subscribe((res: string) => {
|
|
159
|
+
// LABEL_TOMORROW = res;
|
|
160
|
+
// });
|
|
161
|
+
// var labelDays: string = LABEL_TODAY;
|
|
162
|
+
// var _MS_PER_DAY = 1000 * 60 * 60 * 24;
|
|
163
|
+
// // Esclude l'ora ed il fuso orario
|
|
164
|
+
// var utc1 = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
|
|
165
|
+
// var utc2 = Date.UTC(now.getFullYear(), now.getMonth(), now.getDate());
|
|
166
|
+
// const days = Math.floor((utc2 - utc1) / _MS_PER_DAY);
|
|
167
|
+
// // console.log('setHeaderDate days: ********************',days);
|
|
168
|
+
// if (days > 6) {
|
|
169
|
+
// labelDays = date.toLocaleDateString();//date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear();
|
|
170
|
+
// }
|
|
171
|
+
// else if (days == 0) {
|
|
172
|
+
// labelDays = LABEL_TODAY;
|
|
173
|
+
// } else if (days == 1) {
|
|
174
|
+
// labelDays = LABEL_TOMORROW;
|
|
175
|
+
// } else {
|
|
176
|
+
// labelDays = convertDayToString(translate, date.getDay());
|
|
177
|
+
// }
|
|
178
|
+
// // console.log('setHeaderDate labelDays: ********************',labelDays);
|
|
179
|
+
// // se le date sono diverse o la data di riferimento non è impostata
|
|
180
|
+
// // ritorna la data calcolata
|
|
181
|
+
// // altrimenti torna null
|
|
182
|
+
// if (lastDate != labelDays || lastDate == null || lastDate == '') {
|
|
183
|
+
// return labelDays;
|
|
184
|
+
// } else {
|
|
185
|
+
// return null;
|
|
186
|
+
// }
|
|
187
|
+
// }
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
190
|
* @deprecated
|
|
191
191
|
*/
|
|
192
|
-
export function setHeaderDate(translate, timestamp): string {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
192
|
+
// export function setHeaderDate(translate, timestamp): string {
|
|
193
|
+
// // const LABEL_TODAY = translate.get('LABEL_TODAY');
|
|
194
|
+
// // const LABEL_TOMORROW = translate.get('LABEL_TOMORROW');
|
|
195
|
+
|
|
196
|
+
// const date = new Date(timestamp);
|
|
197
|
+
// const now: Date = new Date();
|
|
198
|
+
// let labelDays = '';
|
|
199
|
+
// if (now.getFullYear() !== date.getFullYear()) {
|
|
200
|
+
// // quest'anno: data esatta
|
|
201
|
+
// const month = date.getMonth() + 1;
|
|
202
|
+
// labelDays = date.getDay() + '/' + month + '/' + date.getFullYear();
|
|
203
|
+
// } else if (now.getMonth() !== date.getMonth()) {
|
|
204
|
+
// // questo mese: data esatta
|
|
205
|
+
// const month = date.getMonth() + 1;
|
|
206
|
+
// labelDays = date.getDay() + '/' + month + '/' + date.getFullYear();
|
|
207
|
+
// } else if (now.getDay() === date.getDay()) {
|
|
208
|
+
// // oggi: oggi
|
|
209
|
+
// labelDays = moment().calendar(timestamp).split(' ')[0].toLocaleLowerCase();
|
|
210
|
+
// // labelDays = LABEL_TODAY;
|
|
211
|
+
// } else if (now.getDay() - date.getDay() === 1) {
|
|
212
|
+
// // ieri: ieri
|
|
213
|
+
// labelDays = moment().calendar(timestamp).split(' ')[0].toLocaleLowerCase();
|
|
214
|
+
// // labelDays = LABEL_TOMORROW;
|
|
215
|
+
// } else {
|
|
216
|
+
// // questa settimana: giorno
|
|
217
|
+
// labelDays = convertDayToString(translate, date.getDay());
|
|
218
|
+
// }
|
|
219
|
+
// // se le date sono diverse o la data di riferimento non è impostata
|
|
220
|
+
// // ritorna la data calcolata
|
|
221
|
+
// // altrimenti torna null
|
|
222
|
+
// return labelDays;
|
|
223
|
+
// }
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
|
|
@@ -229,33 +229,33 @@ export function setHeaderDate(translate, timestamp): string {
|
|
|
229
229
|
* utilizzata per calcolare data ultimo accesso utente
|
|
230
230
|
* @param timestamp
|
|
231
231
|
*/
|
|
232
|
-
export function setLastDate(translate, timestamp): string {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
232
|
+
// export function setLastDate(translate, timestamp): string {
|
|
233
|
+
|
|
234
|
+
// const LABEL_TODAY = translate.get('LABEL_TODAY');
|
|
235
|
+
// const LABEL_TOMORROW = translate.get('LABEL_TOMORROW');
|
|
236
|
+
// const LABEL_TO = translate.get('LABEL_TO');
|
|
237
|
+
// const LABEL_LAST_ACCESS = translate.get('LABEL_LAST_ACCESS');
|
|
238
|
+
|
|
239
|
+
// var date = new Date(timestamp);
|
|
240
|
+
// let now: Date = new Date();
|
|
241
|
+
// var labelDays = '';
|
|
242
|
+
// if (now.getFullYear() !== date.getFullYear()) {
|
|
243
|
+
// const month = date.getMonth() + 1;
|
|
244
|
+
// labelDays = date.getDay() + '/' + month + '/' + date.getFullYear();
|
|
245
|
+
// } else if (now.getMonth() !== date.getMonth()) {
|
|
246
|
+
// const month = date.getMonth() + 1;
|
|
247
|
+
// labelDays = date.getDay() + '/' + month + '/' + date.getFullYear();
|
|
248
|
+
// } else if (now.getDay() === date.getDay()) {
|
|
249
|
+
// labelDays = LABEL_TODAY;
|
|
250
|
+
// } else if (now.getDay() - date.getDay() === 1) {
|
|
251
|
+
// labelDays = LABEL_TOMORROW;
|
|
252
|
+
// } else {
|
|
253
|
+
// labelDays = convertDayToString(translate, date.getDay());
|
|
254
|
+
// }
|
|
255
|
+
// // aggiungo orario
|
|
256
|
+
// const orario = date.getHours() + ':' + (date.getMinutes() < 10 ? '0' : '') + date.getMinutes();
|
|
257
|
+
// return LABEL_LAST_ACCESS + ' ' + labelDays + ' ' + LABEL_TO + ' ' + orario;
|
|
258
|
+
// }
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
*
|