@chat21/chat21-ionic 3.0.61-rc3 → 3.0.61-rc7
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 +31 -0
- package/config.xml +5 -5
- package/deploy_pre.sh +10 -10
- package/deploy_prod.sh +5 -1
- package/env.sample +1 -1
- package/package.json +6 -6
- package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash.png +0 -0
- package/src/app/app.component.html +4 -3
- package/src/app/app.component.scss +6 -1
- package/src/app/app.component.ts +24 -13
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +6 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +90 -20
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +31 -33
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +5 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +15 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -3
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +12 -2
- package/src/app/components/ddp-header/ddp-header.component.html +3 -3
- package/src/app/components/ddp-header/ddp-header.component.ts +1 -1
- package/src/app/components/project-item/project-item.component.html +1 -1
- package/src/app/components/sidebar/sidebar.component.html +119 -66
- package/src/app/components/sidebar/sidebar.component.scss +53 -4
- package/src/app/components/sidebar/sidebar.component.ts +134 -41
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +13 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +35 -27
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +122 -57
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +2 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -4
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1297 -783
- package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
- package/src/app/pages/conversations-list/conversations-list.page.html +9 -6
- package/src/app/pages/conversations-list/conversations-list.page.scss +9 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +47 -15
- package/src/app/pages/loader-preview/loader-preview.page.ts +235 -166
- package/src/app/pages/profile-info/profile-info.page.scss +1 -1
- package/src/app/services/tiledesk/tiledesk.service.ts +19 -0
- package/src/app/utils/scrollbar-theme.directive.ts +58 -24
- package/src/assets/i18n/de.json +10 -7
- package/src/assets/i18n/en.json +6 -3
- package/src/assets/i18n/es.json +5 -2
- package/src/assets/i18n/fr.json +8 -5
- package/src/assets/i18n/it.json +5 -2
- package/src/assets/i18n/pt.json +5 -2
- package/src/assets/i18n/ru.json +6 -3
- package/src/assets/i18n/tr.json +5 -2
- package/src/assets/images/language_flag/hr.png +0 -0
- package/src/assets/images/language_flag/sr.png +0 -0
- package/src/chat-config-pre-test.json +1 -1
- package/src/chat-config-template.json +1 -1
- package/src/chat-config.json +1 -1
- package/src/chat21-core/utils/constants.ts +4 -1
- package/src/global.scss +35 -105
- package/publish_pre.sh +0 -33
- package/publish_prod.sh +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.61-rc7
|
|
4
|
+
- Fixes the bug: while loading the app, the conversation list changes size and becomes wider
|
|
5
|
+
- Changes the style of the left sidebar
|
|
6
|
+
- Display in the "user data drawer" an avatar constructed with the initials of the logged in teammate if his profile picture is not available
|
|
7
|
+
|
|
8
|
+
### 3.0.61-rc6
|
|
9
|
+
- Enhances the style of the sidebar tooltips
|
|
10
|
+
- Fixed bug: for direct conversations opening the "info sidebar" by clicking on the teammate avatar available in the conversation detail header does not work correctly
|
|
11
|
+
- Fixes the bug: not all chat strings are translated into the browser language or into the selected language
|
|
12
|
+
- Fixes the bug: Email is broken on dashes in user details sidebar
|
|
13
|
+
- Displays an alert when a teammate archives a conversation from a project they are no longer a part of
|
|
14
|
+
- Disable the "send message" textarea when a teammate replies to a support conversation of a project he is no longer a part of
|
|
15
|
+
- Adds, when an image is pasted in the "send message" text area, the text of the text area as a caption of the image preview modal window
|
|
16
|
+
- Adds, when an image is uploaded, the text of the "send message" text area as a caption of the image preview modal window
|
|
17
|
+
|
|
18
|
+
### 3.0.61-rc5
|
|
19
|
+
- Fixes the bug: on mobile devices the chat content is shifted to the right
|
|
20
|
+
- Adds the ability to open and close the "user detail sidebar" by clicking on the avatar of the logged teammate present on the sidebar
|
|
21
|
+
- Fixes the bug: canned responses remain visible even if, after making a filter, the backslash is deleted
|
|
22
|
+
- Prevents the "open canned responses" button from inserting a backslash if another one exists before
|
|
23
|
+
- Hides the badge that displays the number of unassigned conversations if there are none
|
|
24
|
+
- Improves custom scrollbar displayed in the sidebar and in user detail sidebar
|
|
25
|
+
- Adds custom scrollbars to the conversation list and to the conversation detail
|
|
26
|
+
|
|
27
|
+
### 3.0.61-rc4
|
|
28
|
+
- Hides the item showing unassigned conversations in the list of archived conversations
|
|
29
|
+
- 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"
|
|
30
|
+
- Changes all occurrences of the "teammatesButton" environment variable to "writeToButton"
|
|
31
|
+
- 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
|
|
32
|
+
- Moves for conversations of type "support" the "Resolve conversation" button from the dropdown menu to the header of the conversation detail
|
|
33
|
+
|
|
3
34
|
### 3.0.61-rc3
|
|
4
35
|
- Replaces console.log with custom loggers
|
|
5
36
|
- Fixes the bug: the info support sidebar is no more displayed
|
package/config.xml
CHANGED
|
@@ -100,19 +100,19 @@
|
|
|
100
100
|
<splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
|
|
101
101
|
</platform>
|
|
102
102
|
<engine name="android" spec="^6.2.3" />
|
|
103
|
-
<engine name="browser" spec="5.0.4" />
|
|
103
|
+
<engine name="browser" spec="^5.0.4" />
|
|
104
104
|
<engine name="ios" spec="6.1.1" />
|
|
105
105
|
<plugin name="cordova-android-support-gradle-release" spec="^3.0.1">
|
|
106
106
|
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
|
|
107
107
|
</plugin>
|
|
108
108
|
<plugin name="cordova-plugin-chooser" spec="^1.3.2" />
|
|
109
|
-
<plugin name="cordova-plugin-device" spec="^2.0.
|
|
109
|
+
<plugin name="cordova-plugin-device" spec="^2.0.3" />
|
|
110
110
|
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
|
|
111
111
|
<plugin name="cordova-plugin-ionic-webview" spec="^4.2.1">
|
|
112
112
|
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
|
|
113
113
|
</plugin>
|
|
114
114
|
<plugin name="cordova-plugin-network-information" spec="^2.0.2" />
|
|
115
|
-
<plugin name="cordova-plugin-splashscreen" spec="^5.0.
|
|
116
|
-
<plugin name="cordova-plugin-statusbar" spec="^2.4.
|
|
117
|
-
<plugin name="cordova-plugin-whitelist" spec="^1.3.
|
|
115
|
+
<plugin name="cordova-plugin-splashscreen" spec="^5.0.4" />
|
|
116
|
+
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
|
|
117
|
+
<plugin name="cordova-plugin-whitelist" spec="^1.3.5" />
|
|
118
118
|
</widget>
|
package/deploy_pre.sh
CHANGED
|
@@ -24,15 +24,15 @@ sed -i -e "s/$URL_VER/g" src/utils/constants.ts
|
|
|
24
24
|
|
|
25
25
|
# ng build --prod --base-href /$NEW_BUILD/
|
|
26
26
|
#ionic cordova build browser --prod
|
|
27
|
-
#ionic cordova build browser --prod --release
|
|
28
|
-
# ionic cordova build --env=pre browser --prod #--verbose
|
|
29
27
|
|
|
30
28
|
ionic cordova platform add browser --save
|
|
29
|
+
#ionic cordova build browser --prod --release
|
|
30
|
+
# ionic cordova build --env=pre browser --prod #--verbose
|
|
31
31
|
ionic cordova build -c=pre browser --prod
|
|
32
32
|
cp -p src/firebase-messaging-sw.js platforms/browser/www/
|
|
33
33
|
cp -p src/manifest.json platforms/browser/www/
|
|
34
34
|
cp -p src/chat-config.json platforms/browser/www/
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
|
|
37
37
|
######### chat-ionic5 - the good one - publish in pre
|
|
38
38
|
cd platforms/browser/www
|
|
@@ -47,18 +47,18 @@ echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat
|
|
|
47
47
|
echo available on https://support-pre.tiledesk.com/chat-ionic5/$version/index.html
|
|
48
48
|
echo available on https://support-pre.tiledesk.com/chat-ionic5/index.html
|
|
49
49
|
|
|
50
|
-
######### chat-ionic5-
|
|
50
|
+
######### chat-ionic5-panel - publish in pre with the projects right panel
|
|
51
51
|
# cd platforms/browser/www
|
|
52
|
-
# aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-
|
|
53
|
-
# aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-
|
|
52
|
+
# aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
|
|
53
|
+
# aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/
|
|
54
54
|
# cd ../../../
|
|
55
55
|
|
|
56
56
|
# aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
|
|
57
57
|
|
|
58
|
-
# echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5-
|
|
59
|
-
# echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5-
|
|
60
|
-
# echo available on https://support-pre.tiledesk.com/chat-ionic5-
|
|
61
|
-
# echo available on https://support-pre.tiledesk.com/chat-ionic5-
|
|
58
|
+
# echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
|
|
59
|
+
# echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5-panel/$version/index.html
|
|
60
|
+
# echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/$version/index.html
|
|
61
|
+
# echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/index.html
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
####### chat ionic MQTT in pre da aggiungere in deploy_pre.sh
|
package/deploy_prod.sh
CHANGED
|
@@ -25,9 +25,13 @@ cp -p config.xml platforms/browser/www/
|
|
|
25
25
|
|
|
26
26
|
###### CHAT in prod
|
|
27
27
|
cd platforms/browser/www
|
|
28
|
-
aws s3 sync . s3://tiledesk-
|
|
28
|
+
aws s3 sync . s3://tiledesk-dashboard/v2/chat/
|
|
29
29
|
aws s3 sync . s3://tiledesk-console/v2/chat/$version/
|
|
30
30
|
cd ../../../
|
|
31
|
+
# aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
|
|
32
|
+
|
|
33
|
+
# echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
|
|
34
|
+
echo new version deployed on s3://tiledesk-console/v2/chat/$version/
|
|
31
35
|
echo new version deployed on s3://tiledesk-console/v2/chat/
|
|
32
36
|
echo available on https://console.tiledesk.com/v2/chat/$version/index.html
|
|
33
37
|
echo available on https://console.tiledesk.com/v2/chat/index.html
|
package/env.sample
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chat21/chat21-ionic",
|
|
3
|
-
"version": "3.0.61-
|
|
3
|
+
"version": "3.0.61-rc7",
|
|
4
4
|
"author": "Tiledesk SRL",
|
|
5
5
|
"homepage": "https://ionicframework.com/",
|
|
6
6
|
"scripts": {
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"autolinker": "^3.14.2",
|
|
40
40
|
"cordova-android": "^6.2.3",
|
|
41
41
|
"cordova-android-support-gradle-release": "^3.0.1",
|
|
42
|
-
"cordova-browser": "5.0.4",
|
|
42
|
+
"cordova-browser": "^5.0.4",
|
|
43
43
|
"cordova-ios": "6.1.1",
|
|
44
44
|
"cordova-plugin-chooser": "^1.3.2",
|
|
45
|
-
"cordova-plugin-device": "^2.0.
|
|
45
|
+
"cordova-plugin-device": "^2.0.3",
|
|
46
46
|
"cordova-plugin-ionic-keyboard": "^2.2.0",
|
|
47
47
|
"cordova-plugin-ionic-webview": "^4.2.1",
|
|
48
48
|
"cordova-plugin-network-information": "^2.0.2",
|
|
49
|
-
"cordova-plugin-splashscreen": "^5.0.
|
|
50
|
-
"cordova-plugin-statusbar": "^2.4.
|
|
51
|
-
"cordova-plugin-whitelist": "^1.3.
|
|
49
|
+
"cordova-plugin-splashscreen": "^5.0.4",
|
|
50
|
+
"cordova-plugin-statusbar": "^2.4.3",
|
|
51
|
+
"cordova-plugin-whitelist": "^1.3.5",
|
|
52
52
|
"cordova-res": "^0.15.1",
|
|
53
53
|
"core-js": "^2.5.4",
|
|
54
54
|
"firebase": "^8.6.7",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -12,15 +12,16 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<ion-split-pane when="md" contentId="main">
|
|
15
|
-
|
|
16
|
-
<ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-
|
|
15
|
+
<!-- 'sidebar-visible': IS_ONLINE === true && SUPPORT_MODE === true, -->
|
|
16
|
+
<ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-hidden': IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}"></ion-nav>
|
|
17
17
|
<!-- our side menu -->
|
|
18
18
|
<!-- <ion-router-outlet id="sidebar" name='sidebar' animated="false" #masterNav> -->
|
|
19
19
|
<!-- <app-conversations-list></app-conversations-list> -->
|
|
20
20
|
<!-- <app-details></app-details> -->
|
|
21
21
|
<!-- </ion-router-outlet> -->
|
|
22
22
|
<!-- the main content -->
|
|
23
|
-
|
|
23
|
+
<!-- -->
|
|
24
|
+
<ion-router-outlet id="main" #detailNav animated="false" [ngClass]="{'router-outlet-margin-left': platformIs === 'mobile' && SUPPORT_MODE === true && IS_ON_MOBILE_DEVICE === false}">
|
|
24
25
|
</ion-router-outlet>
|
|
25
26
|
</ion-split-pane>
|
|
26
27
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.split-pane-md.split-pane-visible > .split-pane-side {
|
|
2
2
|
min-width: 312px;
|
|
3
3
|
display: block; // Safari bug fix
|
|
4
|
+
margin-left: 60px;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.sidebar-visible {
|
|
@@ -8,13 +9,17 @@
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.sidebar-hidden {
|
|
11
|
-
margin-left: 0px;
|
|
12
|
+
margin-left: 0px !important;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.hide-sidebar {
|
|
15
16
|
display: none;
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
.router-outlet-margin-left {
|
|
20
|
+
left: 60px
|
|
21
|
+
}
|
|
22
|
+
|
|
18
23
|
// @media (min-width: 768px) {
|
|
19
24
|
// .split-pane-md.split-pane-visible > .split-pane-side {
|
|
20
25
|
// min-width: 312px;
|
package/src/app/app.component.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
|
|
1
|
+
import { tranlatedLanguage, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
|
|
2
2
|
import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
|
|
3
3
|
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
|
|
4
4
|
|
|
@@ -78,7 +78,7 @@ export class AppComponent implements OnInit {
|
|
|
78
78
|
public sidebarPage: any;
|
|
79
79
|
public notificationsEnabled: boolean;
|
|
80
80
|
public zone: NgZone;
|
|
81
|
-
|
|
81
|
+
public platformIs: string;
|
|
82
82
|
private doitResize: any;
|
|
83
83
|
private timeModalLogin: any;
|
|
84
84
|
public tenant: string;
|
|
@@ -158,7 +158,7 @@ export class AppComponent implements OnInit {
|
|
|
158
158
|
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
159
159
|
this.IS_ON_MOBILE_DEVICE = true;
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
162
162
|
return this.IS_ON_MOBILE_DEVICE;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -549,8 +549,8 @@ export class AppComponent implements OnInit {
|
|
|
549
549
|
currentUserId = currentUser.uid;
|
|
550
550
|
this.logger.log('[APP-COMP] - setLanguage current_user uid: ', currentUserId);
|
|
551
551
|
}
|
|
552
|
-
this.translate.setDefaultLang('en');
|
|
553
|
-
this.translate.use('en');
|
|
552
|
+
// this.translate.setDefaultLang('en');
|
|
553
|
+
// this.translate.use('en');
|
|
554
554
|
|
|
555
555
|
const browserLang = this.translate.getBrowserLang();
|
|
556
556
|
this.logger.log('[APP-COMP] browserLang: ', browserLang);
|
|
@@ -563,8 +563,19 @@ export class AppComponent implements OnInit {
|
|
|
563
563
|
} else if (browserLang && stored_preferred_lang) {
|
|
564
564
|
chat_lang = stored_preferred_lang
|
|
565
565
|
}
|
|
566
|
-
|
|
567
|
-
this.
|
|
566
|
+
|
|
567
|
+
this.logger.log('[APP-COMP] - chat_lang', chat_lang)
|
|
568
|
+
|
|
569
|
+
if (tranlatedLanguage.includes(chat_lang)) {
|
|
570
|
+
this.logger.log('[APP-COMP] tranlatedLanguage includes',chat_lang , ': ', tranlatedLanguage.includes(chat_lang))
|
|
571
|
+
this.translate.setDefaultLang(chat_lang)
|
|
572
|
+
this.translate.use(chat_lang);
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
this.logger.log('[APP-COMP] tranlatedLanguage includes',chat_lang , ': ', tranlatedLanguage.includes(chat_lang))
|
|
576
|
+
this.translate.setDefaultLang('en');
|
|
577
|
+
this.translate.use('en');
|
|
578
|
+
}
|
|
568
579
|
|
|
569
580
|
// this.logger.debug('[APP-COMP] navigator.language: ', navigator.language);
|
|
570
581
|
// let language;
|
|
@@ -894,12 +905,12 @@ export class AppComponent implements OnInit {
|
|
|
894
905
|
}
|
|
895
906
|
|
|
896
907
|
/**
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
908
|
+
* goOnLine:
|
|
909
|
+
* 1 - nascondo splashscreen
|
|
910
|
+
* 2 - recupero il tiledeskToken e lo salvo in chat manager
|
|
911
|
+
* 3 - carico in d
|
|
912
|
+
* @param user
|
|
913
|
+
*/
|
|
903
914
|
goOnLine = () => {
|
|
904
915
|
this.logger.log('[APP-COMP]- GO-ONLINE ');
|
|
905
916
|
// this.isOnline = true;
|
|
@@ -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> - ->
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, IterableDiffers, KeyValueDiffers, OnInit, Output } from '@angular/core';
|
|
1
|
+
import { Component, EventEmitter, Input, IterableDiffers, KeyValueDiffers, OnInit, Output, SimpleChange } from '@angular/core';
|
|
2
2
|
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
3
3
|
import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service';
|
|
4
4
|
import { convertMessage } from 'src/chat21-core/utils/utils';
|
|
@@ -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
|
+
import { AlertController } from '@ionic/angular';
|
|
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
|
|
|
@@ -25,8 +24,10 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
|
|
|
25
24
|
})
|
|
26
25
|
export class IonListConversationsComponent extends ListConversationsComponent implements OnInit {
|
|
27
26
|
|
|
27
|
+
@Input() archiveActionNotAllowed: boolean;
|
|
28
28
|
@Input() uidConvSelected: string;
|
|
29
29
|
@Output() onCloseConversation = new EventEmitter<ConversationModel>();
|
|
30
|
+
@Output() onCloseAlert = new EventEmitter();
|
|
30
31
|
|
|
31
32
|
convertMessage = convertMessage;
|
|
32
33
|
isApp: boolean = false;
|
|
@@ -36,15 +37,20 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
36
37
|
|
|
37
38
|
public PROJECT_FOR_PANEL: any;
|
|
38
39
|
public archive_btn_tooltip: string;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
public resolve_btn_tooltip: string;
|
|
41
|
+
public alert_lbl: string;
|
|
42
|
+
public actionNotAllowed_lbl: string;
|
|
43
|
+
public youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl: string;
|
|
44
|
+
public ok_lbl: string;
|
|
45
|
+
|
|
46
|
+
tooltip_options = {
|
|
47
|
+
'show-delay': 0,
|
|
42
48
|
'tooltip-class': 'chat-tooltip',
|
|
43
49
|
'theme': 'light',
|
|
44
50
|
'shadow': false,
|
|
45
51
|
'hide-delay-mobile': 0,
|
|
46
52
|
'hideDelayAfterClick': 3000,
|
|
47
|
-
'hide-delay':
|
|
53
|
+
'hide-delay': 100
|
|
48
54
|
};
|
|
49
55
|
/**
|
|
50
56
|
*
|
|
@@ -57,12 +63,12 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
57
63
|
public kvDiffers: KeyValueDiffers,
|
|
58
64
|
public platform: Platform,
|
|
59
65
|
private translate: TranslateService,
|
|
60
|
-
// private events: EventsService,
|
|
61
|
-
// private tiledeskService: TiledeskService,
|
|
62
66
|
private networkService: NetworkService,
|
|
63
67
|
private appConfigProvider: AppConfigProvider,
|
|
64
68
|
private sanitizer: DomSanitizer,
|
|
65
|
-
public tiledeskAuthService: TiledeskAuthService
|
|
69
|
+
public tiledeskAuthService: TiledeskAuthService,
|
|
70
|
+
public alertController: AlertController
|
|
71
|
+
|
|
66
72
|
) {
|
|
67
73
|
super(iterableDiffers, kvDiffers)
|
|
68
74
|
this.setMomentLocale();
|
|
@@ -88,16 +94,59 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
88
94
|
|
|
89
95
|
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
90
96
|
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
91
|
-
this.
|
|
97
|
+
this.translateLbls();
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
ngOnInit() {
|
|
101
|
+
this.isApp = this.platform.is('ios') || this.platform.is('android')
|
|
102
|
+
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
|
|
103
|
+
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
ngOnChanges(changes: { [property: string]: SimpleChange }) {
|
|
108
|
+
// Extract changes to the input property by its name
|
|
109
|
+
let change: SimpleChange = changes['archiveActionNotAllowed'];
|
|
110
|
+
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnChanges change ', change);
|
|
111
|
+
// console.log('[ION-LIST-CONVS-COMP] - ngOnChanges change currentValue ', change.currentValue)
|
|
112
|
+
if (change && change.currentValue === true) {
|
|
113
|
+
this.pesentAlertActionNotAllowed()
|
|
114
|
+
}
|
|
115
|
+
// Whenever the data in the parent changes, this method gets triggered. You
|
|
116
|
+
// can act on the changes here. You will have both the previous value and the
|
|
117
|
+
// current value here.
|
|
92
118
|
}
|
|
93
119
|
|
|
94
|
-
|
|
120
|
+
|
|
121
|
+
translateLbls() {
|
|
95
122
|
this.translate.get('Resolve')
|
|
96
123
|
.subscribe((text: string) => {
|
|
97
|
-
|
|
124
|
+
this.resolve_btn_tooltip = text;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
this.translate.get('Archive')
|
|
128
|
+
.subscribe((text: string) => {
|
|
98
129
|
this.archive_btn_tooltip = text;
|
|
99
|
-
|
|
100
|
-
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
this.translate.get('ALERT_TITLE')
|
|
133
|
+
.subscribe((text: string) => {
|
|
134
|
+
this.alert_lbl = text;
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
this.translate.get('ActionNotAllowed')
|
|
138
|
+
.subscribe((text: string) => {
|
|
139
|
+
this.actionNotAllowed_lbl = text;
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
this.translate.get('YouAreNoLongerAmongTheTeammatesManagingThisConversation')
|
|
143
|
+
.subscribe((text: string) => {
|
|
144
|
+
this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl = text;
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
this.translate.get('CLOSE_ALERT_CONFIRM_LABEL')
|
|
148
|
+
.subscribe((text: string) => {
|
|
149
|
+
this.ok_lbl = text;
|
|
101
150
|
});
|
|
102
151
|
}
|
|
103
152
|
|
|
@@ -124,10 +173,29 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
124
173
|
moment.locale(chat_lang)
|
|
125
174
|
}
|
|
126
175
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
async pesentAlertActionNotAllowed() {
|
|
179
|
+
|
|
180
|
+
const alert = await this.alertController.create({
|
|
181
|
+
cssClass: 'my-custom-class',
|
|
182
|
+
header: this.alert_lbl,
|
|
183
|
+
subHeader: this.actionNotAllowed_lbl,
|
|
184
|
+
message: this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl,
|
|
185
|
+
buttons: [
|
|
186
|
+
{
|
|
187
|
+
text: this.ok_lbl,
|
|
188
|
+
handler: () => {
|
|
189
|
+
this.alertClosed();
|
|
190
|
+
// console.log('Confirm Okay');
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
await alert.present();
|
|
197
|
+
|
|
198
|
+
|
|
131
199
|
}
|
|
132
200
|
|
|
133
201
|
|
|
@@ -151,7 +219,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
151
219
|
// });
|
|
152
220
|
// }
|
|
153
221
|
|
|
154
|
-
|
|
222
|
+
alertClosed() {
|
|
223
|
+
this.onCloseAlert.emit(true)
|
|
224
|
+
}
|
|
155
225
|
|
|
156
226
|
closeConversation(conversation: ConversationModel) {
|
|
157
227
|
var conversationId = conversation.uid;
|
|
@@ -1,49 +1,40 @@
|
|
|
1
|
-
|
|
2
1
|
<ion-header no-border class="ion-no-border">
|
|
3
2
|
<ion-toolbar style="height:60px">
|
|
4
3
|
<ion-buttons slot="start" style="height:60px">
|
|
5
4
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
6
5
|
<ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
|
|
7
|
-
</ion-back-button>
|
|
6
|
+
</ion-back-button>
|
|
8
7
|
</ion-buttons>
|
|
9
8
|
|
|
10
9
|
<ion-title [class.info-open]="openInfoConversation || openInfoMessage">
|
|
11
10
|
|
|
12
|
-
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr">
|
|
11
|
+
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
|
|
13
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
14
|
-
<div *ngIf="conversationAvatar" class="avatar-container"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
></app-avatar-profile>
|
|
13
|
+
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
14
|
+
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
15
|
+
<app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
|
|
18
16
|
</div>
|
|
19
17
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
20
|
-
<div *ngIf="isDirect" class="user-presence" [ngClass]
|
|
21
|
-
<app-user-presence
|
|
22
|
-
[
|
|
23
|
-
[translationMap] = translationMap
|
|
24
|
-
[borderColor] = borderColor
|
|
25
|
-
[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>
|
|
26
21
|
</app-user-presence>
|
|
27
22
|
</div>
|
|
28
23
|
|
|
29
24
|
<div *ngIf="conversationAvatar" class="user-typing">
|
|
30
|
-
<app-user-typing
|
|
31
|
-
[
|
|
32
|
-
|
|
33
|
-
[isDirect] = isDirect
|
|
34
|
-
[translationMap] = translationMap
|
|
35
|
-
[color] = fontColor
|
|
36
|
-
[membersConversation] = membersConversation
|
|
37
|
-
></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>
|
|
38
28
|
</div>
|
|
39
29
|
|
|
40
30
|
</div>
|
|
41
31
|
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
<!-- (click)="onOpenCloseInfoConversation()" -->
|
|
33
|
+
<div *ngIf="conversationAvatar" class="tile-info-with"
|
|
34
|
+
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
44
35
|
<!-- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span> -->
|
|
45
36
|
<span class="tile-username">{{ conversation_with_fullname }} </span>
|
|
46
|
-
|
|
37
|
+
|
|
47
38
|
</div>
|
|
48
39
|
|
|
49
40
|
<!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
|
|
@@ -54,15 +45,22 @@
|
|
|
54
45
|
<!-- openInfoConversation {{openInfoConversation}} -->
|
|
55
46
|
<ion-buttons slot="end">
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
<ion-button *ngIf="idConv.startsWith('support-group')" ion-button fill="clear" color="primary" size="small" (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" style="">
|
|
49
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
50
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
51
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
52
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
53
|
+
</ion-button>
|
|
54
|
+
|
|
55
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
56
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
57
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
58
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
59
|
+
|
|
60
|
+
</ion-button>
|
|
61
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
62
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
63
|
+
</ion-button>
|
|
66
64
|
|
|
67
65
|
</ion-buttons>
|
|
68
66
|
|