@chat21/chat21-ionic 3.0.60 → 3.0.61-rc2
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 +23 -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 +11 -2
- package/src/app/app.component.scss +13 -1
- package/src/app/app.component.ts +26 -3
- package/src/app/app.module.ts +2 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +2 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +24 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +2 -3
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -2
- package/src/app/components/ddp-header/ddp-header.component.html +14 -7
- 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 +423 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +21 -20
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -5
- package/src/app/pages/conversations-list/conversations-list.page.ts +33 -8
- 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 +29 -12
- package/src/assets/i18n/en.json +21 -4
- package/src/assets/i18n/es.json +21 -4
- package/src/assets/i18n/fr.json +21 -4
- package/src/assets/i18n/it.json +21 -4
- package/src/assets/i18n/pt.json +21 -4
- package/src/assets/i18n/ru.json +21 -4
- package/src/assets/i18n/tr.json +23 -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/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/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,28 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.61-rc2
|
|
4
|
+
- Fixes the bug: Profile picture in the sidebar does not update when logged in with another user after logging out
|
|
5
|
+
- Bug Fix: in the "info-profile" page avoid the "uid of undefined" error
|
|
6
|
+
- Adds the "user details" sidebar
|
|
7
|
+
- Adds the languages flags images
|
|
8
|
+
- Allows to close the "user details" sidebar by clicking outside it
|
|
9
|
+
- Adds the tooltips to the links of the sidebar
|
|
10
|
+
- 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
|
|
11
|
+
- Hides in the item showing unassigned conversations the button to pin a project if the app is not on a mobile device
|
|
12
|
+
- Gets in the sidebar the feature tokens from the environment variables
|
|
13
|
+
- Install the "Roboto" font
|
|
14
|
+
- Changes font priority in global.scss: replace "Helvetica Neue" font with "Roboto" font
|
|
15
|
+
- Imports the "Poppins" font family into index.html
|
|
16
|
+
- Adds the "Resolve" tooltip to the "archive" button available in the conversation list
|
|
17
|
+
- 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
|
|
18
|
+
- Adds "teammatesButton" and "archivedButton" variables to the environments
|
|
19
|
+
- Adds the "TEAMMATES_BUTTON" and the "ARCHIVED_BUTTON" variables to the env.sample file
|
|
20
|
+
- Adds the "teammatesButton" and the "archivedButton" variables to the "chat-config-template.json" file and to "the chat-config.json" file
|
|
21
|
+
- Updates the section "Configuration" of the "README.md" file with the new variables "teammatesButton" and the "archivedButton"
|
|
22
|
+
|
|
23
|
+
### 3.0.61-rc1
|
|
24
|
+
- Adds a sidebar that allows navigation to the dashboard
|
|
25
|
+
|
|
3
26
|
### 3.0.60
|
|
4
27
|
- Deploys in production
|
|
5
28
|
|
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
|
+
TEAMMATES_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-rc2",
|
|
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,10 +1,19 @@
|
|
|
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> -->
|
|
@@ -1,8 +1,20 @@
|
|
|
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
|
+
|
|
6
18
|
// @media (min-width: 768px) {
|
|
7
19
|
// .split-pane-md.split-pane-visible > .split-pane-side {
|
|
8
20
|
// 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({
|
|
@@ -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,7 +118,7 @@
|
|
|
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="{{ archive_btn_tooltip }}" [options]="tooltipOptions" placement="bottom"
|
|
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>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
{{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
|
|
143
143
|
<!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
|
|
144
144
|
</span>
|
|
145
|
-
<i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
|
|
145
|
+
<!-- <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i> -->
|
|
146
146
|
</div>
|
|
147
147
|
|
|
148
148
|
<!-- && !conversation?.archived -->
|
|
@@ -35,7 +35,17 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
35
35
|
public browserLang: string;
|
|
36
36
|
|
|
37
37
|
public PROJECT_FOR_PANEL: any;
|
|
38
|
-
|
|
38
|
+
public archive_btn_tooltip: string;
|
|
39
|
+
|
|
40
|
+
tooltipOptions = {
|
|
41
|
+
'show-delay': 1500,
|
|
42
|
+
'tooltip-class': 'chat-tooltip',
|
|
43
|
+
'theme': 'light',
|
|
44
|
+
'shadow': false,
|
|
45
|
+
'hide-delay-mobile': 0,
|
|
46
|
+
'hideDelayAfterClick': 3000,
|
|
47
|
+
'hide-delay': 200
|
|
48
|
+
};
|
|
39
49
|
/**
|
|
40
50
|
*
|
|
41
51
|
* @param iterableDiffers
|
|
@@ -78,6 +88,19 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
78
88
|
|
|
79
89
|
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
80
90
|
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
91
|
+
this.translateLbl();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
translateLbl() {
|
|
95
|
+
this.translate.get('Resolve')
|
|
96
|
+
.subscribe((text: string) => {
|
|
97
|
+
// this.deleteContact_msg = text;
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
this.archive_btn_tooltip = text;
|
|
101
|
+
console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
|
|
102
|
+
|
|
103
|
+
});
|
|
81
104
|
}
|
|
82
105
|
|
|
83
106
|
setMomentLocale() {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
<ion-header no-border class="ion-no-border">
|
|
3
|
-
<ion-toolbar>
|
|
4
|
-
|
|
5
|
-
<ion-buttons slot="start">
|
|
3
|
+
<ion-toolbar style="height:60px">
|
|
4
|
+
<ion-buttons slot="start" style="height:60px">
|
|
6
5
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
7
6
|
<ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
|
|
8
7
|
</ion-back-button>
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
[groupDetail]="groupDetail">
|
|
11
11
|
</app-info-group>
|
|
12
12
|
|
|
13
|
-
<app-info-support-group *ngIf="panelType === 'support-group-panel'"
|
|
13
|
+
<!-- <app-info-support-group *ngIf="panelType === 'support-group-panel'"
|
|
14
14
|
[urlConversationSupportGroup]="urlConversationSupportGroup">
|
|
15
|
-
</app-info-support-group>
|
|
15
|
+
</app-info-support-group> -->
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
</ion-content>
|
|
@@ -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="
|
|
18
|
-
<ion-icon slot="icon-only" name="
|
|
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> -->
|
|
19
20
|
</ion-button>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
<ion-button *ngIf="teammates_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)">
|
|
23
|
+
<!-- <ion-icon slot="icon-only" name="create-outline"></ion-icon> -->
|
|
24
|
+
<ion-icon slot="icon-only" name="people-outline"></ion-icon>
|
|
25
|
+
|
|
26
|
+
</ion-button>
|
|
27
|
+
|
|
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() teammates_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
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
<div class="flex-child-right">
|
|
51
|
-
<div class="project-name-project-for-panel" [tooltip]="conversationsInQueueOnProjectName"
|
|
51
|
+
<div class="project-name-project-for-panel" [ngClass]="{'project-name-project-for-panel-on-desktop': IS_ON_MOBILE_DEVICE === false}" [tooltip]="conversationsInQueueOnProjectName"
|
|
52
52
|
[options]="tooltipOptions" placement="top" content-type="template" (click)="openUnservedConvs()">
|
|
53
53
|
<div class="project---name"> {{ project?.id_project?.name }} </div>
|
|
54
54
|
</div>
|
|
@@ -87,7 +87,9 @@
|
|
|
87
87
|
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
|
|
88
88
|
{{translationMap?.get('Unavailable')}}
|
|
89
89
|
</span>
|
|
90
|
-
|
|
90
|
+
|
|
91
|
+
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true" tooltip=" {{translationMap?.get('Busy')}}"
|
|
92
|
+
[options]="tooltipOptions" placement="top" >
|
|
91
93
|
<!-- <span class="material-icons project-item--isBusy-icon">
|
|
92
94
|
access_time
|
|
93
95
|
</span> -->
|
|
@@ -102,14 +104,14 @@
|
|
|
102
104
|
</g>
|
|
103
105
|
</svg>
|
|
104
106
|
</div>
|
|
105
|
-
<span *ngIf="project?.ws_projct_user_isBusy === true"
|
|
107
|
+
<!-- <span *ngIf="project?.ws_projct_user_isBusy === true"
|
|
106
108
|
class="project-item--isBusy-busy-text text-pulse-animation">
|
|
107
109
|
{{translationMap?.get('Busy')}}
|
|
108
|
-
</span>
|
|
110
|
+
</span> -->
|
|
109
111
|
</div>
|
|
110
112
|
</div>
|
|
111
113
|
|
|
112
|
-
<div class="flex-child-view-all-convs">
|
|
114
|
+
<div *ngIf="IS_ON_MOBILE_DEVICE === true" class="flex-child-view-all-convs">
|
|
113
115
|
<div class="view-all-convs-icon-wpr" style="cursor: pointer;" [tooltip]="viewAllConvs"
|
|
114
116
|
[options]="tooltipOptions" placement="top" content-type="template">
|
|
115
117
|
|
|
@@ -153,7 +155,6 @@
|
|
|
153
155
|
</div>
|
|
154
156
|
<ng-template #viewAllConvs>
|
|
155
157
|
<span>
|
|
156
|
-
|
|
157
158
|
{{translationMap?.get('CHANGE_PINNED_PROJECT') }}</span>
|
|
158
159
|
</ng-template>
|
|
159
160
|
</div>
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
color: #1e2129;
|
|
312
312
|
font-weight: 400;
|
|
313
313
|
margin-left: 10px;
|
|
314
|
-
width: 185px
|
|
314
|
+
width: 185px ;
|
|
315
315
|
// width: 220px !important;
|
|
316
316
|
white-space: nowrap !important;
|
|
317
317
|
overflow: hidden !important;
|
|
@@ -323,6 +323,11 @@
|
|
|
323
323
|
cursor: pointer;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
|
|
327
|
+
.project-name-project-for-panel-on-desktop {
|
|
328
|
+
width: 217px
|
|
329
|
+
}
|
|
330
|
+
|
|
326
331
|
// .project-name-project-for-panel:hover span {
|
|
327
332
|
// color: rgba(0, 0, 0, 0.35);
|
|
328
333
|
// // display: none;
|
|
@@ -17,6 +17,8 @@ import { AppConfigProvider } from 'src/app/services/app-config';
|
|
|
17
17
|
styleUrls: ['./project-item.component.scss'],
|
|
18
18
|
})
|
|
19
19
|
export class ProjectItemComponent implements OnInit {
|
|
20
|
+
private logger: LoggerService = LoggerInstance.getInstance();
|
|
21
|
+
|
|
20
22
|
@Output() projectIdEvent = new EventEmitter<string>()
|
|
21
23
|
@Output() openUnsevedConvsEvent = new EventEmitter<any>()
|
|
22
24
|
|
|
@@ -29,7 +31,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
29
31
|
ROLE_IS_AGENT: boolean;
|
|
30
32
|
currentUserId: string;
|
|
31
33
|
public translationMap: Map<string, string>;
|
|
32
|
-
|
|
34
|
+
|
|
33
35
|
window_width_is_60: boolean;
|
|
34
36
|
newInnerWidth: any;
|
|
35
37
|
avaialble_status_for_tooltip: string;
|
|
@@ -42,7 +44,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
42
44
|
'hideDelayAfterClick': 3000,
|
|
43
45
|
'hide-delay': 200
|
|
44
46
|
};
|
|
45
|
-
|
|
47
|
+
IS_ON_MOBILE_DEVICE: boolean;
|
|
46
48
|
constructor(
|
|
47
49
|
public wsService: WebsocketService,
|
|
48
50
|
public appStorageService: AppStorageService,
|
|
@@ -59,9 +61,20 @@ export class ProjectItemComponent implements OnInit {
|
|
|
59
61
|
this.translations();
|
|
60
62
|
this.listenToPostMsgs();
|
|
61
63
|
this.onInitWindowWidth();
|
|
64
|
+
|
|
65
|
+
this.isOnMobileDevice()
|
|
62
66
|
// console.log('[PROJECT-ITEM] - on INIT')
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
isOnMobileDevice() {
|
|
70
|
+
this.IS_ON_MOBILE_DEVICE = false;
|
|
71
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
72
|
+
this.IS_ON_MOBILE_DEVICE = true;
|
|
73
|
+
}
|
|
74
|
+
console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
75
|
+
return this.IS_ON_MOBILE_DEVICE;
|
|
76
|
+
}
|
|
77
|
+
|
|
65
78
|
openUnservedConvs() {
|
|
66
79
|
this.openUnsevedConvsEvent.emit('notificationsorprjctbtn')
|
|
67
80
|
}
|