@chat21/chat21-ionic 3.0.55 → 3.0.59-rc10
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 +65 -0
- package/README.md +4 -0
- package/config.xml +11 -2
- package/env.sample +2 -0
- package/package.json +1 -1
- package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash.png +0 -0
- package/src/app/app-routing.module.ts +21 -17
- package/src/app/app.component.html +6 -3
- package/src/app/app.component.ts +323 -185
- package/src/app/app.module.ts +16 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +4 -4
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +8 -2
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +6 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +48 -3
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +7 -6
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +20 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +39 -9
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +8 -144
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -17
- package/src/app/components/authentication/login/login.component.html +2 -2
- package/src/app/components/authentication/login/login.component.ts +2 -1
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +17 -12
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +12 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +21 -5
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +22 -17
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -5
- package/src/app/components/ddp-header/ddp-header.component.html +1 -1
- package/src/app/components/ddp-header/ddp-header.component.ts +4 -2
- package/src/app/components/image-viewer/image-viewer.component.html +23 -0
- package/src/app/components/image-viewer/image-viewer.component.scss +107 -0
- package/src/app/components/image-viewer/image-viewer.component.spec.ts +24 -0
- package/src/app/components/image-viewer/image-viewer.component.ts +38 -0
- package/src/app/components/project-item/project-item.component.html +147 -0
- package/src/app/components/project-item/project-item.component.scss +669 -0
- package/src/app/components/project-item/project-item.component.spec.ts +24 -0
- package/src/app/components/project-item/project-item.component.ts +316 -0
- package/src/app/components/utils/avatar-profile/avatar-profile.component.html +7 -0
- package/src/app/components/utils/avatar-profile/avatar-profile.component.ts +22 -5
- package/src/app/pages/authentication/login/login.page.ts +2 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +122 -30
- package/src/app/pages/conversations-list/conversations-list.page.html +40 -24
- package/src/app/pages/conversations-list/conversations-list.page.scss +146 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +87 -6
- package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +79 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +108 -0
- package/src/app/services/nav-proxy.service.ts +1 -1
- package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
- package/src/app/services/websocket/websocket-js.ts +559 -0
- package/src/app/services/websocket/websocket.service.spec.ts +12 -0
- package/src/app/services/websocket/websocket.service.ts +274 -0
- package/src/app/shared/shared.module.ts +7 -1
- package/src/assets/i18n/en.json +9 -1
- package/src/assets/i18n/it.json +10 -2
- package/src/assets/js/chat21client.js +141 -67
- package/src/assets/transparent.png +0 -0
- package/src/chat-config-pre-test.json +4 -2
- package/src/chat-config-template.json +3 -1
- package/src/chat-config.json +3 -1
- package/src/chat21-core/providers/abstract/app-storage.service.ts +2 -2
- package/src/chat21-core/providers/chat-manager.ts +3 -3
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +125 -79
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +11 -17
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -2
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
- package/src/chat21-core/providers/localSessionStorage.ts +155 -154
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +27 -27
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +13 -5
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +101 -11
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +1 -1
- package/src/chat21-core/utils/utils.ts +1 -1
- package/src/global.scss +2 -7
- package/src/index.html +1 -1
package/src/app/app.module.ts
CHANGED
|
@@ -94,7 +94,8 @@ import { TooltipModule } from 'ng2-tooltip-directive';
|
|
|
94
94
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
95
95
|
import { Network } from '@ionic-native/network/ngx';
|
|
96
96
|
import { ConnectionService } from 'ng-connection-service';
|
|
97
|
-
|
|
97
|
+
import { WebSocketJs } from './services/websocket/websocket-js';
|
|
98
|
+
import { UnassignedConversationsPageModule } from './pages/unassigned-conversations/unassigned-conversations.module';
|
|
98
99
|
|
|
99
100
|
// FACTORIES
|
|
100
101
|
export function createTranslateLoader(http: HttpClient) {
|
|
@@ -102,7 +103,7 @@ export function createTranslateLoader(http: HttpClient) {
|
|
|
102
103
|
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
export function authenticationFactory(http: HttpClient, appConfig: AppConfigProvider, chat21Service: Chat21Service, appSorage: AppStorageService, network: Network, connectionService:ConnectionService) {
|
|
106
|
+
export function authenticationFactory(http: HttpClient, appConfig: AppConfigProvider, chat21Service: Chat21Service, appSorage: AppStorageService, network: Network, connectionService: ConnectionService) {
|
|
106
107
|
const config = appConfig.getConfig()
|
|
107
108
|
if (config.chatEngine === CHAT_ENGINE_MQTT) {
|
|
108
109
|
|
|
@@ -111,8 +112,13 @@ export function authenticationFactory(http: HttpClient, appConfig: AppConfigProv
|
|
|
111
112
|
|
|
112
113
|
const auth = new MQTTAuthService(http, chat21Service, appSorage);
|
|
113
114
|
|
|
114
|
-
auth.setBaseUrl(appConfig.getConfig().apiUrl)
|
|
115
|
-
|
|
115
|
+
auth.setBaseUrl(appConfig.getConfig().apiUrl);
|
|
116
|
+
|
|
117
|
+
if (config.pushEngine = PUSH_ENGINE_MQTT) {
|
|
118
|
+
// FOR PUSH NOTIFICATIONS INIT FIREBASE APP
|
|
119
|
+
FirebaseInitService.initFirebase(config.firebaseConfig);
|
|
120
|
+
}
|
|
121
|
+
|
|
116
122
|
return auth
|
|
117
123
|
} else {
|
|
118
124
|
|
|
@@ -120,7 +126,7 @@ export function authenticationFactory(http: HttpClient, appConfig: AppConfigProv
|
|
|
120
126
|
// console.log('[APP-MOD] FirebaseInitService config ', config)
|
|
121
127
|
const auth = new FirebaseAuthService(http, network, connectionService);
|
|
122
128
|
auth.setBaseUrl(config.apiUrl)
|
|
123
|
-
|
|
129
|
+
|
|
124
130
|
return auth
|
|
125
131
|
}
|
|
126
132
|
}
|
|
@@ -216,12 +222,12 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigProvider, ap
|
|
|
216
222
|
}
|
|
217
223
|
}
|
|
218
224
|
|
|
219
|
-
export function notificationsServiceFactory(appConfig: AppConfigProvider) {
|
|
225
|
+
export function notificationsServiceFactory(appConfig: AppConfigProvider, chat21Service: Chat21Service) {
|
|
220
226
|
const config = appConfig.getConfig()
|
|
221
227
|
if (config.pushEngine === PUSH_ENGINE_FIREBASE) {
|
|
222
228
|
return new FirebaseNotifications();
|
|
223
229
|
} else if (config.pushEngine === PUSH_ENGINE_MQTT) {
|
|
224
|
-
return new MQTTNotifications();
|
|
230
|
+
return new MQTTNotifications(chat21Service);
|
|
225
231
|
} else {
|
|
226
232
|
return;
|
|
227
233
|
}
|
|
@@ -253,6 +259,7 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
|
|
|
253
259
|
LoginPageModule,
|
|
254
260
|
ConversationListPageModule,
|
|
255
261
|
ConversationDetailPageModule,
|
|
262
|
+
UnassignedConversationsPageModule,
|
|
256
263
|
TranslateModule.forRoot({
|
|
257
264
|
loader: {
|
|
258
265
|
provide: TranslateLoader,
|
|
@@ -338,7 +345,7 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
|
|
|
338
345
|
{
|
|
339
346
|
provide: NotificationsService,
|
|
340
347
|
useFactory: notificationsServiceFactory,
|
|
341
|
-
deps: [AppConfigProvider]
|
|
348
|
+
deps: [AppConfigProvider, Chat21Service]
|
|
342
349
|
},
|
|
343
350
|
{
|
|
344
351
|
provide: AppStorageService,
|
|
@@ -352,6 +359,7 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
|
|
|
352
359
|
EventsService,
|
|
353
360
|
Chooser,
|
|
354
361
|
Chat21Service,
|
|
362
|
+
WebSocketJs
|
|
355
363
|
]
|
|
356
364
|
})
|
|
357
365
|
export class AppModule { }
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
<div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_MINE, message)" class="msg_container base_sent">
|
|
68
68
|
|
|
69
69
|
<!--backgroundColor non viene ancora usato -->
|
|
70
|
-
<chat-bubble-message
|
|
71
|
-
|
|
70
|
+
<chat-bubble-message [ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}"
|
|
71
|
+
class="messages msg_sent" id="message_msg_sent"
|
|
72
72
|
[ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" [message]="message"
|
|
73
73
|
[textColor]="'col-msg-sent'"
|
|
74
74
|
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
</chat-avatar-image> -->
|
|
99
99
|
|
|
100
100
|
<!--backgroundColor non viene ancora usato -->
|
|
101
|
-
|
|
102
|
-
<chat-bubble-message class="messages msg_receive"
|
|
101
|
+
|
|
102
|
+
<chat-bubble-message [ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}" class="messages msg_receive" id="message_msg_receive"
|
|
103
103
|
[message]="message"
|
|
104
104
|
[textColor]="'black'"
|
|
105
105
|
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
@@ -93,7 +93,9 @@ ion-item {
|
|
|
93
93
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
.has-metadata {
|
|
97
|
+
max-width: 100% !important;
|
|
98
|
+
}
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
/** recive message **/
|
|
@@ -138,7 +140,11 @@ ion-item {
|
|
|
138
140
|
border-top-left-radius: 8px;
|
|
139
141
|
border-bottom-left-radius: 0px;
|
|
140
142
|
|
|
141
|
-
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.has-metadata {
|
|
146
|
+
max-width: 100% !important;
|
|
147
|
+
}
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
.time{
|
|
@@ -5,6 +5,7 @@ import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter} from
|
|
|
5
5
|
import { MESSAGE_TYPE_INFO, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from 'src/chat21-core/utils/constants';
|
|
6
6
|
import { isChannelTypeGroup, isFirstMessage, isInfo, isMine, messageType } from 'src/chat21-core/utils/utils-message';
|
|
7
7
|
import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
|
|
8
|
+
import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
|
|
8
9
|
|
|
9
10
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
10
11
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
@@ -25,6 +26,10 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
25
26
|
public uploadProgress: number = 100
|
|
26
27
|
public fileType: any
|
|
27
28
|
|
|
29
|
+
isImage = isImage;
|
|
30
|
+
isFile = isFile;
|
|
31
|
+
isFrame = isFrame;
|
|
32
|
+
|
|
28
33
|
isMine = isMine;
|
|
29
34
|
isInfo = isInfo;
|
|
30
35
|
isFirstMessage = isFirstMessage;
|
|
@@ -34,7 +39,7 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
34
39
|
MESSAGE_TYPE_INFO = MESSAGE_TYPE_INFO;
|
|
35
40
|
MESSAGE_TYPE_MINE = MESSAGE_TYPE_MINE;
|
|
36
41
|
MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
|
|
37
|
-
|
|
42
|
+
logger: LoggerService = LoggerInstance.getInstance()
|
|
38
43
|
/**
|
|
39
44
|
* Constructor
|
|
40
45
|
* @param cdref
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" -->
|
|
2
2
|
<!-- [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px'}" -->
|
|
3
3
|
<!-- isImage >{{isImage(message) }} message.metadata.width {{message?.metadata?.width }} -->
|
|
4
|
-
<div
|
|
4
|
+
<div id="bubble-message" [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px', 'width': (isImage(message) || isFrame(message))? message?.metadata?.width + 'px' : null }"
|
|
5
5
|
class="messages primary-color"
|
|
6
6
|
[class.emoticon]="message?.emoticon">
|
|
7
7
|
|
|
@@ -42,10 +42,15 @@
|
|
|
42
42
|
|
|
43
43
|
<!-- message type:: text -->
|
|
44
44
|
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
45
|
+
|
|
45
46
|
<div *ngIf="message?.text" [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left"
|
|
46
47
|
content-type="template" (click)="handleTooltipEvents($event)">
|
|
47
48
|
<ng-template #timeTooltipLeft>
|
|
48
|
-
<span>{{message.timestamp | amTimeAgo}}</span>
|
|
49
|
+
<!-- <span>{{message.timestamp | amTimeAgo}}</span> -->
|
|
50
|
+
<!-- <span> {{browserLang === 'it' ? (message.timestamp| amDateFormat:'DD MMM') : (message.timestamp |
|
|
51
|
+
amDateFormat:'MMM DD')}} </span> amCalendar -->
|
|
52
|
+
|
|
53
|
+
<span> {{message.timestamp | amCalendar }} </span>
|
|
49
54
|
</ng-template>
|
|
50
55
|
|
|
51
56
|
<chat-text
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { MAX_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
|
|
|
5
5
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
6
6
|
import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
9
|
+
import * as moment from 'moment';
|
|
8
10
|
@Component({
|
|
9
11
|
selector: 'chat-bubble-message',
|
|
10
12
|
templateUrl: './bubble-message.component.html',
|
|
@@ -21,6 +23,8 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
21
23
|
isFile = isFile;
|
|
22
24
|
isFrame = isFrame;
|
|
23
25
|
|
|
26
|
+
public browserLang: string;
|
|
27
|
+
|
|
24
28
|
tooltipOptions = {
|
|
25
29
|
'show-delay': 500,
|
|
26
30
|
'tooltip-class': 'chat-tooltip',
|
|
@@ -32,17 +36,58 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
35
|
-
constructor(
|
|
36
|
-
|
|
39
|
+
constructor(
|
|
40
|
+
public sanitizer: DomSanitizer,
|
|
41
|
+
private translate: TranslateService) {
|
|
42
|
+
// console.log('BUBBLE-MSG Hello !!!!')
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
ngOnInit() {
|
|
46
|
+
this.browserLang = this.translate.getBrowserLang();
|
|
47
|
+
// console.log('BUBBLE-MSG ngOnInit browserLang ', this.browserLang)
|
|
48
|
+
if (this.browserLang) {
|
|
49
|
+
if (this.browserLang === 'it') {
|
|
50
|
+
// console.log('BUBBLE-MSG browserLang ', this.browserLang)
|
|
51
|
+
// moment.locale('it')
|
|
52
|
+
|
|
53
|
+
moment.locale('it', {
|
|
54
|
+
calendar: {
|
|
55
|
+
lastDay: '[Ieri alle] LT',
|
|
56
|
+
sameDay: '[Oggi alle] LT',
|
|
57
|
+
nextDay: '[Domani alle] LT',
|
|
58
|
+
lastWeek: '[Ultimo] dddd [alle] LT',
|
|
59
|
+
nextWeek: 'dddd [alle] LT',
|
|
60
|
+
sameElse: 'lll'
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
} else {
|
|
65
|
+
// console.log('BUBBLE-MSG browserLang ', this.browserLang)
|
|
66
|
+
// moment.locale('en')
|
|
67
|
+
|
|
68
|
+
moment.locale('en', {
|
|
69
|
+
calendar: {
|
|
70
|
+
lastDay: '[Yesterday at] LT',
|
|
71
|
+
sameDay: '[Today at] LT',
|
|
72
|
+
nextDay: '[Tomorrow at] LT',
|
|
73
|
+
lastWeek: '[last] dddd [at] LT',
|
|
74
|
+
nextWeek: 'dddd [at] LT',
|
|
75
|
+
sameElse: 'lll'
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
// const yesterday = moment().subtract(1, 'day')
|
|
84
|
+
// console.log('BUBBLE-MSG yesterday ', yesterday)
|
|
40
85
|
|
|
41
86
|
}
|
|
42
87
|
|
|
43
88
|
ngOnChanges() {
|
|
44
89
|
// console.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
|
|
45
|
-
if (this.message && this.message.metadata) {
|
|
90
|
+
if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
|
|
46
91
|
this.getMetadataSize(this.message.metadata)
|
|
47
92
|
// console.log('BUBBLE-MSG ngOnChanges message > metadata', this.message.metadata)
|
|
48
93
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<div [ngStyle]="{ 'max-width': width +'px', 'max-height': height +'px' }" style="position: relative; ">
|
|
2
2
|
<div *ngIf="loading" class="loader" [ngStyle]="{ 'width': width +'px', 'height': height +'px' }"></div>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<!-- [tooltip]="timeTooltipRight" [options]="tooltipOptions" placement="bottom" content-type="template" -->
|
|
4
|
+
<img id="myImg" [ngStyle]="{ 'width': width +'px', 'height': height +'px' }" style="cursor:pointer"
|
|
5
|
+
class="message-contentX message-content-imageX" [ngClass]="{'isLoadingImage': loading}"
|
|
6
|
+
[src]="metadata.src" (load)="onLoaded($event)" (click)="openImageViewerModal(metadata.src, metadata.name)" />
|
|
7
|
+
<!-- <ng-template #timeTooltipRight>
|
|
7
8
|
<span>{{ tooltipMessage }}</span>
|
|
8
|
-
</ng-template>
|
|
9
|
-
</div>
|
|
9
|
+
</ng-template> -->
|
|
10
|
+
</div>
|
|
@@ -14,6 +14,8 @@ export class ImageComponent implements OnInit {
|
|
|
14
14
|
|
|
15
15
|
loading: boolean = true
|
|
16
16
|
tooltipMessage: string;
|
|
17
|
+
modal: any
|
|
18
|
+
span: any
|
|
17
19
|
|
|
18
20
|
tooltipOptions = {
|
|
19
21
|
'show-delay': 0,
|
|
@@ -45,7 +47,7 @@ export class ImageComponent implements OnInit {
|
|
|
45
47
|
this.onImageRendered.emit(true)
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
_downloadImage(url: string, fileName: string) {
|
|
49
51
|
// console.log('Image COMP - IMAGE URL ', url)
|
|
50
52
|
// console.log('Image COMP - IMAGE FILENAME ', fileName)
|
|
51
53
|
const a: any = document.createElement('a');
|
|
@@ -56,4 +58,21 @@ export class ImageComponent implements OnInit {
|
|
|
56
58
|
a.click();
|
|
57
59
|
a.remove();
|
|
58
60
|
}
|
|
61
|
+
|
|
62
|
+
openImageViewerModal(url: string, fileName: string) {
|
|
63
|
+
this.modal = document.getElementById("image-viewer-modal");
|
|
64
|
+
// console.log('has clicked open image-viewer modal ', this.modal)
|
|
65
|
+
this.modal.style.display = "block";
|
|
66
|
+
var modalImg = <HTMLImageElement>document.getElementById("image-viewer-img");
|
|
67
|
+
var captionText = document.getElementById("caption");
|
|
68
|
+
modalImg.src = url
|
|
69
|
+
captionText.innerHTML = fileName;
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
59
76
|
}
|
|
77
|
+
|
|
78
|
+
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
<!-- -------------------------------------------------------------------------- -->
|
|
26
26
|
<!-- New <ion-spinner class="spinner-middle" style="margin-left: 19px;"></ion-spinner> -->
|
|
27
27
|
<!-- -------------------------------------------------------------------------- -->
|
|
28
|
-
<ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
|
|
28
|
+
<!-- <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
|
|
29
|
+
<div tabindex="0"></div>
|
|
29
30
|
<ion-avatar item-start>
|
|
30
31
|
<div class="sk-fading-circle">
|
|
31
32
|
<div class="sk-circle1 sk-circle"></div>
|
|
@@ -43,10 +44,39 @@
|
|
|
43
44
|
</div>
|
|
44
45
|
</ion-avatar>
|
|
45
46
|
<ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
|
|
46
|
-
</ion-item>
|
|
47
|
+
</ion-item> -->
|
|
48
|
+
|
|
49
|
+
<!-- <ion-item>
|
|
50
|
+
<div tabindex="0"></div>
|
|
51
|
+
<iframe loading="lazy" width="100%" height="70px" style="border: unset;" [src]="PROJECT_FOR_PANEL"></iframe>
|
|
52
|
+
</ion-item> -->
|
|
53
|
+
<!-- <ion-item button="true" (click)="openUnsevedConversationIframe()">
|
|
54
|
+
<app-project-item
|
|
55
|
+
(projectIdEvent)="getLastProjectId($event)"></app-project-item>
|
|
56
|
+
</ion-item> -->
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<!-- <ion-item-sliding disabled>
|
|
60
|
+
<ion-item>
|
|
61
|
+
<ion-label>
|
|
62
|
+
Sliding Item, Icons Start
|
|
63
|
+
</ion-label>
|
|
64
|
+
</ion-item>
|
|
65
|
+
<ion-item-options>
|
|
66
|
+
<ion-item-option color="primary">
|
|
67
|
+
<ion-icon slot="start" ios="ellipsis-horizontal" md="ellipsis-vertical"></ion-icon>
|
|
68
|
+
More
|
|
69
|
+
</ion-item-option>
|
|
70
|
+
<ion-item-option color="secondary">
|
|
71
|
+
<ion-icon slot="start" name="archive"></ion-icon>
|
|
72
|
+
Archive
|
|
73
|
+
</ion-item-option>
|
|
74
|
+
</ion-item-options>
|
|
75
|
+
</ion-item-sliding> -->
|
|
76
|
+
|
|
47
77
|
|
|
48
78
|
<ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation.uid === uidConvSelected"
|
|
49
|
-
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)">
|
|
79
|
+
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
|
|
50
80
|
<div tabindex="0"></div>
|
|
51
81
|
|
|
52
82
|
<!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
|
|
@@ -88,7 +118,8 @@
|
|
|
88
118
|
<ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
|
|
89
119
|
|
|
90
120
|
<ion-buttons slot="end">
|
|
91
|
-
<ion-button *ngIf="!conversation.archived"
|
|
121
|
+
<ion-button *ngIf="!conversation.archived"
|
|
122
|
+
[ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
|
|
92
123
|
id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
|
|
93
124
|
item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
|
|
94
125
|
<ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
|
|
@@ -103,21 +134,20 @@
|
|
|
103
134
|
|
|
104
135
|
<div item-end *ngIf="conversation?.archived" class="achived-icon-wpr">
|
|
105
136
|
<span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') === currentYear" class="time-in-archived">
|
|
106
|
-
{{browserLang === '
|
|
107
|
-
amDateFormat:'MMM DD')}}
|
|
137
|
+
{{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD') : (conversation.timestamp| amDateFormat:'DD MMM')}}
|
|
108
138
|
|
|
109
139
|
<!-- {{conversation.timestamp | amDateFormat:'DD MMM'}} -->
|
|
110
140
|
</span>
|
|
111
141
|
<span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') !== currentYear" class="time-in-archived">
|
|
112
|
-
{{browserLang === '
|
|
113
|
-
amDateFormat:'MMM DD YYYY')}}
|
|
142
|
+
{{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
|
|
114
143
|
<!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
|
|
115
144
|
</span>
|
|
116
145
|
<i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
|
|
117
146
|
</div>
|
|
118
147
|
|
|
119
148
|
<!-- && !conversation?.archived -->
|
|
120
|
-
<div item-end class="notification_point"
|
|
149
|
+
<div item-end class="notification_point"
|
|
150
|
+
[ngClass]="{'notification_point-on-desktop': !isApp, 'notification_point-on-mobile': isApp }"
|
|
121
151
|
*ngIf="conversation.is_new">
|
|
122
152
|
</div>
|
|
123
153
|
|
|
@@ -142,6 +142,10 @@ ion-item {
|
|
|
142
142
|
.notification_point-on-desktop {
|
|
143
143
|
bottom: 29px !important;
|
|
144
144
|
}
|
|
145
|
+
.notification_point-on-mobile {
|
|
146
|
+
bottom: 29px !important;
|
|
147
|
+
right: 8px;
|
|
148
|
+
}
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
// ion-item {
|
|
@@ -171,6 +175,10 @@ ion-item:hover {
|
|
|
171
175
|
}
|
|
172
176
|
}
|
|
173
177
|
|
|
178
|
+
.button-on-mobile {
|
|
179
|
+
margin-right: 31px !important;
|
|
180
|
+
}
|
|
181
|
+
|
|
174
182
|
.truncate-on-desktop {
|
|
175
183
|
width: 88% !important
|
|
176
184
|
}
|
|
@@ -212,147 +220,3 @@ ion-item:hover {
|
|
|
212
220
|
}
|
|
213
221
|
|
|
214
222
|
|
|
215
|
-
.waiting-for-connection {
|
|
216
|
-
--background: #fdd764;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// -------------------------------
|
|
220
|
-
// Spinner
|
|
221
|
-
// -------------------------------
|
|
222
|
-
.sk-fading-circle {
|
|
223
|
-
// margin: 100px auto;
|
|
224
|
-
width: 40px;
|
|
225
|
-
height: 40px;
|
|
226
|
-
position: relative;
|
|
227
|
-
margin-left: 5px;
|
|
228
|
-
margin-top: 5px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.sk-fading-circle .sk-circle {
|
|
232
|
-
width: 100%;
|
|
233
|
-
height: 100%;
|
|
234
|
-
position: absolute;
|
|
235
|
-
left: 0;
|
|
236
|
-
top: 0;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.sk-fading-circle .sk-circle:before {
|
|
240
|
-
content: '';
|
|
241
|
-
display: block;
|
|
242
|
-
margin: 0 auto;
|
|
243
|
-
width: 15%;
|
|
244
|
-
height: 15%;
|
|
245
|
-
background-color: #333;
|
|
246
|
-
border-radius: 100%;
|
|
247
|
-
-webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
|
|
248
|
-
animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
|
|
249
|
-
}
|
|
250
|
-
.sk-fading-circle .sk-circle2 {
|
|
251
|
-
-webkit-transform: rotate(30deg);
|
|
252
|
-
-ms-transform: rotate(30deg);
|
|
253
|
-
transform: rotate(30deg);
|
|
254
|
-
}
|
|
255
|
-
.sk-fading-circle .sk-circle3 {
|
|
256
|
-
-webkit-transform: rotate(60deg);
|
|
257
|
-
-ms-transform: rotate(60deg);
|
|
258
|
-
transform: rotate(60deg);
|
|
259
|
-
}
|
|
260
|
-
.sk-fading-circle .sk-circle4 {
|
|
261
|
-
-webkit-transform: rotate(90deg);
|
|
262
|
-
-ms-transform: rotate(90deg);
|
|
263
|
-
transform: rotate(90deg);
|
|
264
|
-
}
|
|
265
|
-
.sk-fading-circle .sk-circle5 {
|
|
266
|
-
-webkit-transform: rotate(120deg);
|
|
267
|
-
-ms-transform: rotate(120deg);
|
|
268
|
-
transform: rotate(120deg);
|
|
269
|
-
}
|
|
270
|
-
.sk-fading-circle .sk-circle6 {
|
|
271
|
-
-webkit-transform: rotate(150deg);
|
|
272
|
-
-ms-transform: rotate(150deg);
|
|
273
|
-
transform: rotate(150deg);
|
|
274
|
-
}
|
|
275
|
-
.sk-fading-circle .sk-circle7 {
|
|
276
|
-
-webkit-transform: rotate(180deg);
|
|
277
|
-
-ms-transform: rotate(180deg);
|
|
278
|
-
transform: rotate(180deg);
|
|
279
|
-
}
|
|
280
|
-
.sk-fading-circle .sk-circle8 {
|
|
281
|
-
-webkit-transform: rotate(210deg);
|
|
282
|
-
-ms-transform: rotate(210deg);
|
|
283
|
-
transform: rotate(210deg);
|
|
284
|
-
}
|
|
285
|
-
.sk-fading-circle .sk-circle9 {
|
|
286
|
-
-webkit-transform: rotate(240deg);
|
|
287
|
-
-ms-transform: rotate(240deg);
|
|
288
|
-
transform: rotate(240deg);
|
|
289
|
-
}
|
|
290
|
-
.sk-fading-circle .sk-circle10 {
|
|
291
|
-
-webkit-transform: rotate(270deg);
|
|
292
|
-
-ms-transform: rotate(270deg);
|
|
293
|
-
transform: rotate(270deg);
|
|
294
|
-
}
|
|
295
|
-
.sk-fading-circle .sk-circle11 {
|
|
296
|
-
-webkit-transform: rotate(300deg);
|
|
297
|
-
-ms-transform: rotate(300deg);
|
|
298
|
-
transform: rotate(300deg);
|
|
299
|
-
}
|
|
300
|
-
.sk-fading-circle .sk-circle12 {
|
|
301
|
-
-webkit-transform: rotate(330deg);
|
|
302
|
-
-ms-transform: rotate(330deg);
|
|
303
|
-
transform: rotate(330deg);
|
|
304
|
-
}
|
|
305
|
-
.sk-fading-circle .sk-circle2:before {
|
|
306
|
-
-webkit-animation-delay: -1.1s;
|
|
307
|
-
animation-delay: -1.1s;
|
|
308
|
-
}
|
|
309
|
-
.sk-fading-circle .sk-circle3:before {
|
|
310
|
-
-webkit-animation-delay: -1s;
|
|
311
|
-
animation-delay: -1s;
|
|
312
|
-
}
|
|
313
|
-
.sk-fading-circle .sk-circle4:before {
|
|
314
|
-
-webkit-animation-delay: -0.9s;
|
|
315
|
-
animation-delay: -0.9s;
|
|
316
|
-
}
|
|
317
|
-
.sk-fading-circle .sk-circle5:before {
|
|
318
|
-
-webkit-animation-delay: -0.8s;
|
|
319
|
-
animation-delay: -0.8s;
|
|
320
|
-
}
|
|
321
|
-
.sk-fading-circle .sk-circle6:before {
|
|
322
|
-
-webkit-animation-delay: -0.7s;
|
|
323
|
-
animation-delay: -0.7s;
|
|
324
|
-
}
|
|
325
|
-
.sk-fading-circle .sk-circle7:before {
|
|
326
|
-
-webkit-animation-delay: -0.6s;
|
|
327
|
-
animation-delay: -0.6s;
|
|
328
|
-
}
|
|
329
|
-
.sk-fading-circle .sk-circle8:before {
|
|
330
|
-
-webkit-animation-delay: -0.5s;
|
|
331
|
-
animation-delay: -0.5s;
|
|
332
|
-
}
|
|
333
|
-
.sk-fading-circle .sk-circle9:before {
|
|
334
|
-
-webkit-animation-delay: -0.4s;
|
|
335
|
-
animation-delay: -0.4s;
|
|
336
|
-
}
|
|
337
|
-
.sk-fading-circle .sk-circle10:before {
|
|
338
|
-
-webkit-animation-delay: -0.3s;
|
|
339
|
-
animation-delay: -0.3s;
|
|
340
|
-
}
|
|
341
|
-
.sk-fading-circle .sk-circle11:before {
|
|
342
|
-
-webkit-animation-delay: -0.2s;
|
|
343
|
-
animation-delay: -0.2s;
|
|
344
|
-
}
|
|
345
|
-
.sk-fading-circle .sk-circle12:before {
|
|
346
|
-
-webkit-animation-delay: -0.1s;
|
|
347
|
-
animation-delay: -0.1s;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
@-webkit-keyframes sk-circleFadeDelay {
|
|
351
|
-
0%, 39%, 100% { opacity: 0; }
|
|
352
|
-
40% { opacity: 1; }
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
@keyframes sk-circleFadeDelay {
|
|
356
|
-
0%, 39%, 100% { opacity: 0; }
|
|
357
|
-
40% { opacity: 1; }
|
|
358
|
-
}
|
|
@@ -7,10 +7,13 @@ import { Platform } from '@ionic/angular';
|
|
|
7
7
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
8
8
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
|
+
|
|
10
11
|
import * as moment from 'moment';
|
|
11
12
|
// import { EventsService } from 'src/app/services/events-service';
|
|
12
13
|
// import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
|
|
13
14
|
import { NetworkService } from '../../../services/network-service/network.service';
|
|
15
|
+
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
16
|
+
import { DomSanitizer } from '@angular/platform-browser'
|
|
14
17
|
// import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
15
18
|
// import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
16
19
|
|
|
@@ -29,8 +32,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
29
32
|
public logger: LoggerService = LoggerInstance.getInstance();
|
|
30
33
|
public currentYear: any;
|
|
31
34
|
public browserLang: string;
|
|
32
|
-
|
|
33
|
-
public
|
|
35
|
+
|
|
36
|
+
public PROJECT_FOR_PANEL: any;
|
|
34
37
|
|
|
35
38
|
/**
|
|
36
39
|
*
|
|
@@ -45,7 +48,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
45
48
|
private translate: TranslateService,
|
|
46
49
|
// private events: EventsService,
|
|
47
50
|
// private tiledeskService: TiledeskService,
|
|
48
|
-
private networkService: NetworkService
|
|
51
|
+
private networkService: NetworkService,
|
|
52
|
+
private appConfigProvider: AppConfigProvider,
|
|
53
|
+
private sanitizer: DomSanitizer,
|
|
49
54
|
) {
|
|
50
55
|
super(iterableDiffers, kvDiffers)
|
|
51
56
|
this.browserLang = this.translate.getBrowserLang();
|
|
@@ -62,31 +67,23 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
62
67
|
|
|
63
68
|
this.currentYear = moment().format('YYYY');
|
|
64
69
|
this.logger.log('[ION-LIST-CONVS-COMP] - currentYear ', this.currentYear)
|
|
70
|
+
|
|
71
|
+
const DASHBOARD_BASE_URL = this.appConfigProvider.getConfig().dashboardUrl;
|
|
72
|
+
|
|
73
|
+
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
74
|
+
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
ngOnInit() {
|
|
68
78
|
this.isApp = this.platform.is('ios') || this.platform.is('android')
|
|
69
79
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
|
|
70
80
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
|
|
71
|
-
this.watchToConnectionStatus();
|
|
72
81
|
}
|
|
73
82
|
|
|
83
|
+
|
|
74
84
|
|
|
75
|
-
watchToConnectionStatus() {
|
|
76
|
-
|
|
77
|
-
this.networkService.checkInternetFunc().subscribe(isOnline => {
|
|
78
|
-
this.checkInternet = isOnline
|
|
79
|
-
this.logger.log('[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline', this.checkInternet)
|
|
80
85
|
|
|
81
|
-
// checking internet connection
|
|
82
|
-
if (this.checkInternet == true) {
|
|
83
86
|
|
|
84
|
-
this.isOnline = true;
|
|
85
|
-
} else {
|
|
86
|
-
this.isOnline = false;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
87
|
// --------------------------------------------------
|
|
91
88
|
// subdsribe to event
|
|
92
89
|
// --------------------------------------------------
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
<ion-spinner *ngIf="showSpinnerInLoginBtn === true" name="bubbles" color="white" duration="2" ></ion-spinner>
|
|
43
43
|
</button>
|
|
44
44
|
|
|
45
|
-
<p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
|
|
45
|
+
<!-- <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
|
|
46
46
|
{{ translationMap.get('LABEL_DONT_HAVE_AN_ACCOUNT_YET') }}
|
|
47
47
|
<span style="color: #03a5e8; cursor:pointer" (click)="goToSignupPage()">
|
|
48
48
|
{{ translationMap.get('LABEL_SIGNUP') }}
|
|
49
49
|
</span>
|
|
50
|
-
</p>
|
|
50
|
+
</p> -->
|
|
51
51
|
|
|
52
52
|
<p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
|
|
53
53
|
{{ translationMap.get('LABEL_FORGOT_YOUR_PASSWORD') }}
|