@chat21/chat21-ionic 3.0.60-rc9 → 3.0.61-rc4
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 +37 -0
- package/README.md +2 -0
- package/angular.json +2 -0
- package/env.sample +3 -1
- package/package.json +5 -1
- package/src/app/app.component.html +12 -3
- package/src/app/app.component.scss +17 -1
- package/src/app/app.component.ts +27 -4
- package/src/app/app.module.ts +2 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +7 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +34 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +31 -35
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +4 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +15 -1
- package/src/app/components/ddp-header/ddp-header.component.html +13 -6
- package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
- package/src/app/components/ddp-header/ddp-header.component.ts +21 -2
- package/src/app/components/project-item/project-item.component.html +7 -6
- package/src/app/components/project-item/project-item.component.scss +6 -1
- package/src/app/components/project-item/project-item.component.ts +15 -2
- package/src/app/components/sidebar/sidebar.component.html +210 -0
- package/src/app/components/sidebar/sidebar.component.scss +11 -0
- package/src/app/components/sidebar/sidebar.component.spec.ts +24 -0
- package/src/app/components/sidebar/sidebar.component.ts +400 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +102 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +310 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.spec.ts +24 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +421 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +21 -20
- package/src/app/pages/conversations-list/conversations-list.page.html +14 -7
- package/src/app/pages/conversations-list/conversations-list.page.ts +60 -23
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.ts +23 -21
- package/src/app/shared/shared.module.ts +13 -0
- package/src/assets/i18n/de.json +30 -12
- package/src/assets/i18n/en.json +22 -4
- package/src/assets/i18n/es.json +22 -4
- package/src/assets/i18n/fr.json +22 -4
- package/src/assets/i18n/it.json +22 -4
- package/src/assets/i18n/pt.json +22 -4
- package/src/assets/i18n/ru.json +22 -4
- package/src/assets/i18n/tr.json +24 -5
- package/src/assets/images/language_flag/ar.png +0 -0
- package/src/assets/images/language_flag/bg.png +0 -0
- package/src/assets/images/language_flag/ca.png +0 -0
- package/src/assets/images/language_flag/cs.png +0 -0
- package/src/assets/images/language_flag/da.png +0 -0
- package/src/assets/images/language_flag/de.png +0 -0
- package/src/assets/images/language_flag/el.png +0 -0
- package/src/assets/images/language_flag/en.png +0 -0
- package/src/assets/images/language_flag/es.png +0 -0
- package/src/assets/images/language_flag/fa.png +0 -0
- package/src/assets/images/language_flag/fi.png +0 -0
- package/src/assets/images/language_flag/fr.png +0 -0
- package/src/assets/images/language_flag/he.png +0 -0
- package/src/assets/images/language_flag/hi.png +0 -0
- package/src/assets/images/language_flag/hr.png +0 -0
- package/src/assets/images/language_flag/hu.png +0 -0
- package/src/assets/images/language_flag/id.png +0 -0
- package/src/assets/images/language_flag/it.png +0 -0
- package/src/assets/images/language_flag/ja.png +0 -0
- package/src/assets/images/language_flag/ko.png +0 -0
- package/src/assets/images/language_flag/ml-IN.png +0 -0
- package/src/assets/images/language_flag/ne-NP.png +0 -0
- package/src/assets/images/language_flag/nl.png +0 -0
- package/src/assets/images/language_flag/no.png +0 -0
- package/src/assets/images/language_flag/pl.png +0 -0
- package/src/assets/images/language_flag/pt-BR.png +0 -0
- package/src/assets/images/language_flag/pt.png +0 -0
- package/src/assets/images/language_flag/ro.png +0 -0
- package/src/assets/images/language_flag/ru.png +0 -0
- package/src/assets/images/language_flag/sk.png +0 -0
- package/src/assets/images/language_flag/sl.png +0 -0
- package/src/assets/images/language_flag/sr.png +0 -0
- package/src/assets/images/language_flag/sv-SE.png +0 -0
- package/src/assets/images/language_flag/ta.png +0 -0
- package/src/assets/images/language_flag/th.png +0 -0
- package/src/assets/images/language_flag/tr.png +0 -0
- package/src/assets/images/language_flag/uk.png +0 -0
- package/src/assets/images/language_flag/vi.png +0 -0
- package/src/assets/images/language_flag/zh-CN.png +0 -0
- package/src/assets/images/language_flag/zh-TW.png +0 -0
- package/src/assets/images/no_image_user.png +0 -0
- package/src/assets/tiledesk-solo-logo.png +0 -0
- package/src/chat-config-pre-test.json +3 -1
- package/src/chat-config-template.json +3 -1
- package/src/chat-config.json +4 -2
- package/src/global.scss +451 -3
- package/src/index.html +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.61-rc4
|
|
4
|
+
- Hides the item showing unassigned conversations in the list of archived conversations
|
|
5
|
+
- Adds in the list of conversations to the "archive" button the tooltip "Resolve" if the conversation is of type "support" and the tooltip "Archive" if the conversation is of type "direct" or "group"
|
|
6
|
+
- Changes all occurrences of the "teammatesButton" environment variable to "writeToButton"
|
|
7
|
+
- Fixes the bug: if the sidebar is visible and the window width is less than 768px, the content of the conversation detail is not completely visible
|
|
8
|
+
- Moves for conversations of type "support" the "Resolve conversation" button from the dropdown menu to the header of the conversation detail
|
|
9
|
+
|
|
10
|
+
### 3.0.61-rc3
|
|
11
|
+
- Replaces console.log with custom loggers
|
|
12
|
+
- Fixes the bug: the info support sidebar is no more displayed
|
|
13
|
+
|
|
14
|
+
### 3.0.61-rc2
|
|
15
|
+
- Fixes the bug: Profile picture in the sidebar does not update when logged in with another user after logging out
|
|
16
|
+
- Bug Fix: in the "info-profile" page avoid the "uid of undefined" error
|
|
17
|
+
- Adds the "user details" sidebar
|
|
18
|
+
- Adds the languages flags images
|
|
19
|
+
- Allows to close the "user details" sidebar by clicking outside it
|
|
20
|
+
- Adds the tooltips to the links of the sidebar
|
|
21
|
+
- Hides the sidebar when the teammate logs out, if the app is on a mobile device and if the environment variable "supportMode" is set to false
|
|
22
|
+
- Hides in the item showing unassigned conversations the button to pin a project if the app is not on a mobile device
|
|
23
|
+
- Gets in the sidebar the feature tokens from the environment variables
|
|
24
|
+
- Install the "Roboto" font
|
|
25
|
+
- Changes font priority in global.scss: replace "Helvetica Neue" font with "Roboto" font
|
|
26
|
+
- Imports the "Poppins" font family into index.html
|
|
27
|
+
- Adds the "Resolve" tooltip to the "archive" button available in the conversation list
|
|
28
|
+
- Displays the "Resolved Conversations" button and the "Teammates" button in the header of the conversation list based on how the "teammatesButton" and "archivedButton" environment variables are set
|
|
29
|
+
- Adds "teammatesButton" and "archivedButton" variables to the environments
|
|
30
|
+
- Adds the "TEAMMATES_BUTTON" and the "ARCHIVED_BUTTON" variables to the env.sample file
|
|
31
|
+
- Adds the "teammatesButton" and the "archivedButton" variables to the "chat-config-template.json" file and to "the chat-config.json" file
|
|
32
|
+
- Updates the section "Configuration" of the "README.md" file with the new variables "teammatesButton" and the "archivedButton"
|
|
33
|
+
|
|
34
|
+
### 3.0.61-rc1
|
|
35
|
+
- Adds a sidebar that allows navigation to the dashboard
|
|
36
|
+
|
|
37
|
+
### 3.0.60
|
|
38
|
+
- Deploys in production
|
|
39
|
+
|
|
3
40
|
### 3.0.60-rc9
|
|
4
41
|
- Adds the message "All conversations served" in the conversation details section that appears when there are no active conversations
|
|
5
42
|
- Fixes the bug: in the item that displays the number of unassigned conversations the button "fix a project" does not go to the right in mobile mode
|
package/README.md
CHANGED
package/angular.json
CHANGED
package/env.sample
CHANGED
|
@@ -3,7 +3,7 @@ DASHBOARD_URL=https://YOUR_DASHBOARD_URL
|
|
|
3
3
|
WS_URL=wss://YOUR_TILEDESK_SERVER_URL?token=
|
|
4
4
|
WS_URL_RELATIVE=********
|
|
5
5
|
SERVER_BASE_URL=http://localhost:3000/
|
|
6
|
-
FEATURES_TOKEN=CAR:F
|
|
6
|
+
FEATURES_TOKEN=CAR:F-PAY:F-ANA:F-ACT:F-APP:F
|
|
7
7
|
CHAT21_ENGINE=mqtt
|
|
8
8
|
UPLOAD_ENGINE=native
|
|
9
9
|
PUSH_ENGINE=none
|
|
@@ -11,6 +11,8 @@ FILE_UPLOAD_ACCEPT=*/*
|
|
|
11
11
|
TENANT=tilechat
|
|
12
12
|
LOG_LEVEL=INFO
|
|
13
13
|
SUPPORT_MODE=false
|
|
14
|
+
WRITE_TO_BUTTON=false,
|
|
15
|
+
ARCHIVED_BUTTON=false,
|
|
14
16
|
|
|
15
17
|
# For MQTT Chat Engine
|
|
16
18
|
MQTT_APPID=tilechat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chat21/chat21-ionic",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.61-rc4",
|
|
4
4
|
"author": "Tiledesk SRL",
|
|
5
5
|
"homepage": "https://ionicframework.com/",
|
|
6
6
|
"scripts": {
|
|
@@ -13,10 +13,13 @@
|
|
|
13
13
|
},
|
|
14
14
|
"private": false,
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"@angular/animations": "^8.2.14",
|
|
17
|
+
"@angular/cdk": "^8.2.3",
|
|
16
18
|
"@angular/common": "~8.2.14",
|
|
17
19
|
"@angular/core": "~8.2.14",
|
|
18
20
|
"@angular/forms": "~8.2.14",
|
|
19
21
|
"@angular/http": "^7.2.16",
|
|
22
|
+
"@angular/material": "^8.2.3",
|
|
20
23
|
"@angular/platform-browser": "~8.2.14",
|
|
21
24
|
"@angular/platform-browser-dynamic": "~8.2.14",
|
|
22
25
|
"@angular/router": "~8.2.14",
|
|
@@ -59,6 +62,7 @@
|
|
|
59
62
|
"ngx-logger": "^4.2.1",
|
|
60
63
|
"ngx-perfect-scrollbar": "^9.0.0",
|
|
61
64
|
"perfect-scrollbar": "^1.5.0",
|
|
65
|
+
"roboto-fontface": "^0.10.0",
|
|
62
66
|
"rxjs": "~6.5.1",
|
|
63
67
|
"tslib": "^1.9.0",
|
|
64
68
|
"zone.js": "~0.9.1"
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
<ion-app>
|
|
2
2
|
<div>
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
<app-image-viewer></app-image-viewer>
|
|
5
|
+
|
|
6
|
+
<div class="sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
|
|
7
|
+
<app-sidebar></app-sidebar>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="user-details-sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
|
|
11
|
+
<app-sidebar-user-details> </app-sidebar-user-details>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
5
14
|
<ion-split-pane when="md" contentId="main">
|
|
6
15
|
|
|
7
|
-
<ion-nav #sidebarNav [root]="sidebarPage"></ion-nav>
|
|
16
|
+
<ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-visible': IS_ONLINE === true && SUPPORT_MODE === true, 'sidebar-hidden': IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}"></ion-nav>
|
|
8
17
|
<!-- our side menu -->
|
|
9
18
|
<!-- <ion-router-outlet id="sidebar" name='sidebar' animated="false" #masterNav> -->
|
|
10
19
|
<!-- <app-conversations-list></app-conversations-list> -->
|
|
11
20
|
<!-- <app-details></app-details> -->
|
|
12
21
|
<!-- </ion-router-outlet> -->
|
|
13
22
|
<!-- the main content -->
|
|
14
|
-
<ion-router-outlet id="main" #detailNav animated="false">
|
|
23
|
+
<ion-router-outlet id="main" #detailNav animated="false" [ngClass]="{'router-outlet-margin-left': platformIs === 'mobile' && SUPPORT_MODE === true}">
|
|
15
24
|
</ion-router-outlet>
|
|
16
25
|
</ion-split-pane>
|
|
17
26
|
</div>
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
.split-pane-md.split-pane-visible > .split-pane-side {
|
|
1
|
+
.split-pane-md.split-pane-visible > .split-pane-side {
|
|
2
2
|
min-width: 312px;
|
|
3
3
|
display: block; // Safari bug fix
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.sidebar-visible {
|
|
7
|
+
margin-left: 60px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.sidebar-hidden {
|
|
11
|
+
margin-left: 0px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.hide-sidebar {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.router-outlet-margin-left {
|
|
19
|
+
left: 60px
|
|
20
|
+
}
|
|
21
|
+
|
|
6
22
|
// @media (min-width: 768px) {
|
|
7
23
|
// .split-pane-md.split-pane-visible > .split-pane-side {
|
|
8
24
|
// min-width: 312px;
|
package/src/app/app.component.ts
CHANGED
|
@@ -58,6 +58,7 @@ import * as PACKAGE from 'package.json';
|
|
|
58
58
|
import { filter } from 'rxjs/operators'
|
|
59
59
|
import { WebSocketJs } from './services/websocket/websocket-js';
|
|
60
60
|
import { Location } from '@angular/common'
|
|
61
|
+
|
|
61
62
|
// import { filter } from 'rxjs/operators';
|
|
62
63
|
|
|
63
64
|
@Component({
|
|
@@ -77,7 +78,7 @@ export class AppComponent implements OnInit {
|
|
|
77
78
|
public sidebarPage: any;
|
|
78
79
|
public notificationsEnabled: boolean;
|
|
79
80
|
public zone: NgZone;
|
|
80
|
-
|
|
81
|
+
public platformIs: string;
|
|
81
82
|
private doitResize: any;
|
|
82
83
|
private timeModalLogin: any;
|
|
83
84
|
public tenant: string;
|
|
@@ -98,7 +99,9 @@ export class AppComponent implements OnInit {
|
|
|
98
99
|
public missingConnectionToast: any
|
|
99
100
|
public executedInitializeAppByWatchConnection: boolean = false;
|
|
100
101
|
private version: string;
|
|
101
|
-
|
|
102
|
+
IS_ONLINE: boolean;
|
|
103
|
+
IS_ON_MOBILE_DEVICE: boolean;
|
|
104
|
+
SUPPORT_MODE: boolean;
|
|
102
105
|
// private isOnline: boolean = false;
|
|
103
106
|
|
|
104
107
|
wsService: WebSocketJs;
|
|
@@ -145,11 +148,20 @@ export class AppComponent implements OnInit {
|
|
|
145
148
|
|
|
146
149
|
this.saveInStorageNumberOfOpenedChatTab();
|
|
147
150
|
this.listenChatAlreadyOpenWithoutParamsInMobileMode()
|
|
148
|
-
|
|
151
|
+
this.isOnMobileDevice()
|
|
149
152
|
// this.listenToUrlChanges();
|
|
150
153
|
// this.getPageState();
|
|
151
154
|
}
|
|
152
155
|
|
|
156
|
+
isOnMobileDevice() {
|
|
157
|
+
this.IS_ON_MOBILE_DEVICE = false;
|
|
158
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
159
|
+
this.IS_ON_MOBILE_DEVICE = true;
|
|
160
|
+
}
|
|
161
|
+
console.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
162
|
+
return this.IS_ON_MOBILE_DEVICE;
|
|
163
|
+
}
|
|
164
|
+
|
|
153
165
|
|
|
154
166
|
|
|
155
167
|
listenChatAlreadyOpenWithoutParamsInMobileMode() {
|
|
@@ -286,6 +298,13 @@ export class AppComponent implements OnInit {
|
|
|
286
298
|
*/
|
|
287
299
|
ngOnInit() {
|
|
288
300
|
const appconfig = this.appConfigProvider.getConfig();
|
|
301
|
+
// console.log('[APP-COMP] appconfig', appconfig)
|
|
302
|
+
if (appconfig && appconfig.supportMode) {
|
|
303
|
+
this.SUPPORT_MODE = appconfig.supportMode
|
|
304
|
+
// console.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
|
|
305
|
+
} else {
|
|
306
|
+
this.SUPPORT_MODE = false;
|
|
307
|
+
}
|
|
289
308
|
this.persistence = appconfig.authPersistence;
|
|
290
309
|
this.appStorageService.initialize(environment.storage_prefix, this.persistence, '')
|
|
291
310
|
// this.logger.log('[APP-COMP] HELLO ngOnInit !!!!!!!')
|
|
@@ -647,7 +666,7 @@ export class AppComponent implements OnInit {
|
|
|
647
666
|
})
|
|
648
667
|
} else {
|
|
649
668
|
this.logger.warn('[APP-COMP] >>> I AM NOT LOGGED IN <<<')
|
|
650
|
-
|
|
669
|
+
this.IS_ONLINE = false;
|
|
651
670
|
// clearTimeout(this.timeModalLogin);
|
|
652
671
|
// this.timeModalLogin = setTimeout(() => {
|
|
653
672
|
if (!this.hadBeenCalledOpenModal) {
|
|
@@ -830,10 +849,14 @@ export class AppComponent implements OnInit {
|
|
|
830
849
|
// const user = this.tiledeskAuthService.getCurrentUser();
|
|
831
850
|
// if (this.isOnline === false) {
|
|
832
851
|
// if (AUTH_STATE_ONLINE) {
|
|
852
|
+
this.IS_ONLINE = true;
|
|
853
|
+
// console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
|
|
833
854
|
this.goOnLine();
|
|
834
855
|
// }
|
|
835
856
|
} else if (state === AUTH_STATE_OFFLINE) {
|
|
836
857
|
// this.checkTokenAndGoOffline() //se c'è un tiledeskToken salvato, allora aspetta, altrimenti vai offline
|
|
858
|
+
this.IS_ONLINE = false;
|
|
859
|
+
// console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
|
|
837
860
|
this.goOffLine()
|
|
838
861
|
}
|
|
839
862
|
}, error => {
|
package/src/app/app.module.ts
CHANGED
|
@@ -96,7 +96,7 @@ 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
98
|
import { UnassignedConversationsPageModule } from './pages/unassigned-conversations/unassigned-conversations.module';
|
|
99
|
-
|
|
99
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
100
100
|
// FACTORIES
|
|
101
101
|
export function createTranslateLoader(http: HttpClient) {
|
|
102
102
|
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
|
@@ -251,6 +251,7 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
|
|
|
251
251
|
],
|
|
252
252
|
imports: [
|
|
253
253
|
BrowserModule,
|
|
254
|
+
BrowserAnimationsModule,
|
|
254
255
|
FormsModule,
|
|
255
256
|
ReactiveFormsModule,
|
|
256
257
|
IonicModule.forRoot(),
|
|
@@ -118,12 +118,17 @@
|
|
|
118
118
|
<ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
|
|
119
119
|
|
|
120
120
|
<ion-buttons slot="end">
|
|
121
|
-
<ion-button *ngIf="!conversation.archived"
|
|
121
|
+
<ion-button *ngIf="!conversation.archived" [tooltip]="archiveTooltip" [options]="tooltip_options" placement="bottom" content-type="template"
|
|
122
122
|
[ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
|
|
123
123
|
id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
|
|
124
124
|
item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
|
|
125
125
|
<ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
|
|
126
126
|
color="close-conversation" name="archive-outline" item-end></ion-icon>
|
|
127
|
+
|
|
128
|
+
<ng-template #archiveTooltip>
|
|
129
|
+
<span *ngIf="conversation?.recipient.startsWith('support-group')"> {{ resolve_btn_tooltip}} </span>
|
|
130
|
+
<span *ngIf="!conversation?.recipient.startsWith('support-group')"> {{ archive_btn_tooltip }} </span>
|
|
131
|
+
</ng-template>
|
|
127
132
|
</ion-button>
|
|
128
133
|
<!-- <ion-button *ngIf="conversation.archived" class="close-conversation-button" ion-button clear item-end disabled padding>
|
|
129
134
|
<!- - <ion-icon style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}" color="close-conversation" name="archive-outline" item-end></ion-icon> - ->
|
|
@@ -142,7 +147,7 @@
|
|
|
142
147
|
{{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
|
|
143
148
|
<!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
|
|
144
149
|
</span>
|
|
145
|
-
<i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
|
|
150
|
+
<!-- <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i> -->
|
|
146
151
|
</div>
|
|
147
152
|
|
|
148
153
|
<!-- && !conversation?.archived -->
|
|
@@ -9,12 +9,11 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
10
|
|
|
11
11
|
import * as moment from 'moment';
|
|
12
|
-
// import { EventsService } from 'src/app/services/events-service';
|
|
13
|
-
// import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
|
|
14
12
|
import { NetworkService } from '../../../services/network-service/network.service';
|
|
15
13
|
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
16
14
|
import { DomSanitizer } from '@angular/platform-browser'
|
|
17
15
|
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
16
|
+
|
|
18
17
|
// import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
19
18
|
// import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
20
19
|
|
|
@@ -35,7 +34,18 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
35
34
|
public browserLang: string;
|
|
36
35
|
|
|
37
36
|
public PROJECT_FOR_PANEL: any;
|
|
38
|
-
|
|
37
|
+
public archive_btn_tooltip: string;
|
|
38
|
+
public resolve_btn_tooltip: string;
|
|
39
|
+
|
|
40
|
+
tooltip_options = {
|
|
41
|
+
'show-delay': 0,
|
|
42
|
+
'tooltip-class': 'chat-tooltip',
|
|
43
|
+
'theme': 'light',
|
|
44
|
+
'shadow': false,
|
|
45
|
+
'hide-delay-mobile': 0,
|
|
46
|
+
'hideDelayAfterClick': 3000,
|
|
47
|
+
'hide-delay': 100
|
|
48
|
+
};
|
|
39
49
|
/**
|
|
40
50
|
*
|
|
41
51
|
* @param iterableDiffers
|
|
@@ -47,12 +57,11 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
47
57
|
public kvDiffers: KeyValueDiffers,
|
|
48
58
|
public platform: Platform,
|
|
49
59
|
private translate: TranslateService,
|
|
50
|
-
// private events: EventsService,
|
|
51
|
-
// private tiledeskService: TiledeskService,
|
|
52
60
|
private networkService: NetworkService,
|
|
53
61
|
private appConfigProvider: AppConfigProvider,
|
|
54
62
|
private sanitizer: DomSanitizer,
|
|
55
|
-
public tiledeskAuthService: TiledeskAuthService
|
|
63
|
+
public tiledeskAuthService: TiledeskAuthService,
|
|
64
|
+
|
|
56
65
|
) {
|
|
57
66
|
super(iterableDiffers, kvDiffers)
|
|
58
67
|
this.setMomentLocale();
|
|
@@ -78,6 +87,25 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
78
87
|
|
|
79
88
|
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
80
89
|
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
90
|
+
this.translateLbls();
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
translateLbls() {
|
|
96
|
+
this.translate.get('Resolve')
|
|
97
|
+
.subscribe((text: string) => {
|
|
98
|
+
// this.deleteContact_msg = text;
|
|
99
|
+
this.resolve_btn_tooltip = text;
|
|
100
|
+
// console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
|
|
101
|
+
|
|
102
|
+
});
|
|
103
|
+
this.translate.get('Archive')
|
|
104
|
+
.subscribe((text: string) => {
|
|
105
|
+
// this.deleteContact_msg = text;
|
|
106
|
+
this.archive_btn_tooltip = text;
|
|
107
|
+
// console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
|
|
108
|
+
});
|
|
81
109
|
}
|
|
82
110
|
|
|
83
111
|
setMomentLocale() {
|
|
@@ -1,50 +1,39 @@
|
|
|
1
|
-
|
|
2
1
|
<ion-header no-border class="ion-no-border">
|
|
3
|
-
<ion-toolbar>
|
|
4
|
-
|
|
5
|
-
<ion-buttons slot="start">
|
|
2
|
+
<ion-toolbar style="height:60px">
|
|
3
|
+
<ion-buttons slot="start" style="height:60px">
|
|
6
4
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
7
5
|
<ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
|
|
8
|
-
</ion-back-button>
|
|
6
|
+
</ion-back-button>
|
|
9
7
|
</ion-buttons>
|
|
10
8
|
|
|
11
9
|
<ion-title [class.info-open]="openInfoConversation || openInfoMessage">
|
|
12
10
|
|
|
13
11
|
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr">
|
|
14
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
15
|
-
<div *ngIf="conversationAvatar" class="avatar-container"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
></app-avatar-profile>
|
|
13
|
+
<div *ngIf="conversationAvatar" class="avatar-container"
|
|
14
|
+
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
15
|
+
<app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
|
|
19
16
|
</div>
|
|
20
17
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
21
|
-
<div *ngIf="isDirect" class="user-presence" [ngClass]
|
|
22
|
-
<app-user-presence
|
|
23
|
-
[
|
|
24
|
-
[translationMap] = translationMap
|
|
25
|
-
[borderColor] = borderColor
|
|
26
|
-
[fontColor] = fontColor>
|
|
18
|
+
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
19
|
+
<app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
|
|
20
|
+
[borderColor]=borderColor [fontColor]=fontColor>
|
|
27
21
|
</app-user-presence>
|
|
28
22
|
</div>
|
|
29
23
|
|
|
30
24
|
<div *ngIf="conversationAvatar" class="user-typing">
|
|
31
|
-
<app-user-typing
|
|
32
|
-
[
|
|
33
|
-
|
|
34
|
-
[isDirect] = isDirect
|
|
35
|
-
[translationMap] = translationMap
|
|
36
|
-
[color] = fontColor
|
|
37
|
-
[membersConversation] = membersConversation
|
|
38
|
-
></app-user-typing>
|
|
25
|
+
<app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
|
|
26
|
+
[translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
|
|
27
|
+
</app-user-typing>
|
|
39
28
|
</div>
|
|
40
29
|
|
|
41
30
|
</div>
|
|
42
31
|
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
43
|
-
<div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()"
|
|
44
|
-
|
|
32
|
+
<div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()"
|
|
33
|
+
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
45
34
|
<!-- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span> -->
|
|
46
35
|
<span class="tile-username">{{ conversation_with_fullname }} </span>
|
|
47
|
-
|
|
36
|
+
|
|
48
37
|
</div>
|
|
49
38
|
|
|
50
39
|
<!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
|
|
@@ -55,15 +44,22 @@
|
|
|
55
44
|
<!-- openInfoConversation {{openInfoConversation}} -->
|
|
56
45
|
<ion-buttons slot="end">
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
<ion-button *ngIf="idConv.startsWith('support-group')" ion-button fill="clear" color="primary" size="small" (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" style="">
|
|
48
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
49
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
50
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
51
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
52
|
+
</ion-button>
|
|
53
|
+
|
|
54
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
55
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
56
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
57
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
58
|
+
|
|
59
|
+
</ion-button>
|
|
60
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
61
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
62
|
+
</ion-button>
|
|
67
63
|
|
|
68
64
|
</ion-buttons>
|
|
69
65
|
|
|
@@ -7,6 +7,10 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
|
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
8
|
import { setConversationAvatar, setChannelType } from 'src/chat21-core/utils/utils';
|
|
9
9
|
import { Platform } from '@ionic/angular';
|
|
10
|
+
// import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
11
|
+
// import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service';
|
|
12
|
+
import { EventsService } from 'src/app/services/events-service';
|
|
13
|
+
|
|
10
14
|
@Component({
|
|
11
15
|
selector: 'app-header-conversation-detail',
|
|
12
16
|
templateUrl: './header-conversation-detail.component.html',
|
|
@@ -44,7 +48,10 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
44
48
|
public imageRepoService: ImageRepoService,
|
|
45
49
|
private route: ActivatedRoute,
|
|
46
50
|
public platform: Platform,
|
|
47
|
-
private router: Router
|
|
51
|
+
private router: Router,
|
|
52
|
+
// public tiledeskAuthService: TiledeskAuthService,
|
|
53
|
+
// public tiledeskService: TiledeskService,
|
|
54
|
+
public events: EventsService,
|
|
48
55
|
) {
|
|
49
56
|
this.route.paramMap.subscribe(params => {
|
|
50
57
|
|
|
@@ -58,6 +65,10 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
58
65
|
});
|
|
59
66
|
}
|
|
60
67
|
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
61
72
|
// ----------------------------------------------------
|
|
62
73
|
// @ Lifehooks
|
|
63
74
|
// ----------------------------------------------------
|
|
@@ -113,7 +124,10 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
113
124
|
this.platformName = 'android'
|
|
114
125
|
this.logger.log('getPlatformName platformName', this.platformName)
|
|
115
126
|
}
|
|
127
|
+
}
|
|
116
128
|
|
|
129
|
+
closeConversation() {
|
|
130
|
+
this.events.publish('hasclosedconversation', this.idConv);
|
|
117
131
|
}
|
|
118
132
|
|
|
119
133
|
onOpenCloseInfoConversation() {
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
+
<ion-toolbar style="height:60px" [ngClass]="{'bottom-border-on-mobile':IS_ON_MOBILE_DEVICE === true }">
|
|
1
2
|
|
|
2
|
-
<ion-
|
|
3
|
-
|
|
4
|
-
<ion-buttons slot="start">
|
|
3
|
+
<ion-buttons *ngIf="IS_ON_MOBILE_DEVICE === true || supportMode === false" slot="start" style="height:60px">
|
|
5
4
|
<ion-button ion-button icon-only fill="clear" (click)="onOpenProfileInfo($event)">
|
|
6
5
|
<ion-icon slot="icon-only" name="reorder-three-outline"></ion-icon>
|
|
7
6
|
</ion-button>
|
|
8
7
|
</ion-buttons>
|
|
9
8
|
|
|
10
9
|
<ion-title>
|
|
11
|
-
<img src="assets/chat21-logo.svg" class="header-logo" alt="header-logo">
|
|
10
|
+
<!-- <img src="assets/chat21-logo.svg" class="header-logo" alt="header-logo"> -->
|
|
12
11
|
<div *ngIf="numberOpenConv > 0" class="number-open-conv">({{numberOpenConv}})</div>
|
|
13
12
|
</ion-title>
|
|
14
13
|
|
|
15
14
|
<ion-buttons slot="end">
|
|
16
15
|
|
|
17
|
-
<ion-button *ngIf="
|
|
16
|
+
<ion-button *ngIf="archived_btn" ion-button fill="clear" (click)="onClickArchivedConversation()">
|
|
17
|
+
<ion-icon slot="icon-only" name="file-tray-full-outline"></ion-icon>
|
|
18
|
+
<!-- <ion-icon name="file-tray-stacked-outline"></ion-icon> -->
|
|
19
|
+
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
20
|
+
</ion-button>
|
|
21
|
+
|
|
22
|
+
<ion-button *ngIf="writeto_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)">
|
|
18
23
|
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
24
|
+
<!-- <ion-icon slot="icon-only" name="people-outline"></ion-icon> -->
|
|
25
|
+
|
|
19
26
|
</ion-button>
|
|
20
27
|
|
|
21
|
-
<!--
|
|
28
|
+
<!-- <button ion-button icon-only (click)="onOpenArchivedConversationsPage()">
|
|
22
29
|
<span class="material-icons">history</span>
|
|
23
30
|
</button>
|
|
24
31
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
|
|
2
|
+
import { EventsService } from 'src/app/services/events-service';
|
|
3
3
|
@Component({
|
|
4
4
|
selector: 'app-ddp-header',
|
|
5
5
|
templateUrl: './ddp-header.component.html',
|
|
@@ -8,11 +8,26 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
8
8
|
export class DdpHeaderComponent implements OnInit {
|
|
9
9
|
@Input() numberOpenConv: number;
|
|
10
10
|
@Input() supportMode: boolean;
|
|
11
|
+
@Input() archived_btn: boolean;
|
|
12
|
+
@Input() writeto_btn: boolean;
|
|
11
13
|
@Output() openContactsDirectory = new EventEmitter();
|
|
12
14
|
@Output() openProfileInfo = new EventEmitter();
|
|
15
|
+
IS_ON_MOBILE_DEVICE: boolean;
|
|
13
16
|
|
|
14
17
|
constructor(
|
|
15
|
-
|
|
18
|
+
public events: EventsService,
|
|
19
|
+
) {
|
|
20
|
+
this.isOnMobileDevice()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
isOnMobileDevice() {
|
|
24
|
+
this.IS_ON_MOBILE_DEVICE = false;
|
|
25
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
26
|
+
this.IS_ON_MOBILE_DEVICE = true;
|
|
27
|
+
}
|
|
28
|
+
// console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
29
|
+
return this.IS_ON_MOBILE_DEVICE;
|
|
30
|
+
}
|
|
16
31
|
|
|
17
32
|
ngOnInit() {
|
|
18
33
|
// console.log('DDP HEADER SUPPORT MODE ', this.supportMode)
|
|
@@ -30,4 +45,8 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
30
45
|
}
|
|
31
46
|
// END @Output() //
|
|
32
47
|
|
|
48
|
+
onClickArchivedConversation() {
|
|
49
|
+
this.events.publish('profileInfoButtonClick:changed', 'displayArchived');
|
|
50
|
+
}
|
|
51
|
+
|
|
33
52
|
}
|