@chat21/chat21-ionic 3.0.61-rc5 → 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 +15 -0
- package/config.xml +5 -5
- package/deploy_pre.sh +10 -10
- package/deploy_prod.sh +5 -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 +2 -2
- package/src/app/app.component.scss +2 -1
- package/src/app/app.component.ts +22 -11
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +78 -15
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +4 -3
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +1 -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/sidebar/sidebar.component.html +119 -66
- package/src/app/components/sidebar/sidebar.component.scss +41 -3
- package/src/app/components/sidebar/sidebar.component.ts +108 -30
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +9 -1
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +25 -17
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +92 -34
- package/src/app/pages/conversation-detail/conversation-detail.page.html +2 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1289 -783
- package/src/app/pages/conversations-list/conversations-list.page.html +3 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +28 -18
- 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/assets/i18n/de.json +9 -7
- package/src/assets/i18n/en.json +5 -3
- package/src/assets/i18n/es.json +4 -2
- package/src/assets/i18n/fr.json +7 -5
- package/src/assets/i18n/it.json +4 -2
- package/src/assets/i18n/pt.json +4 -2
- package/src/assets/i18n/ru.json +5 -3
- package/src/assets/i18n/tr.json +4 -2
- package/src/chat21-core/utils/constants.ts +4 -1
- package/src/global.scss +32 -67
- package/publish_pre.sh +0 -33
- package/publish_prod.sh +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
3
18
|
### 3.0.61-rc5
|
|
4
19
|
- Fixes the bug: on mobile devices the chat content is shifted to the right
|
|
5
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
|
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/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,8 +12,8 @@
|
|
|
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> -->
|
|
@@ -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,7 +9,7 @@
|
|
|
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 {
|
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
|
|
|
@@ -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;
|
|
@@ -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';
|
|
@@ -13,7 +13,7 @@ import { NetworkService } from '../../../services/network-service/network.servic
|
|
|
13
13
|
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
14
14
|
import { DomSanitizer } from '@angular/platform-browser'
|
|
15
15
|
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
16
|
-
|
|
16
|
+
import { AlertController } from '@ionic/angular';
|
|
17
17
|
// import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
18
18
|
// import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
19
19
|
|
|
@@ -24,8 +24,10 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
|
|
|
24
24
|
})
|
|
25
25
|
export class IonListConversationsComponent extends ListConversationsComponent implements OnInit {
|
|
26
26
|
|
|
27
|
+
@Input() archiveActionNotAllowed: boolean;
|
|
27
28
|
@Input() uidConvSelected: string;
|
|
28
29
|
@Output() onCloseConversation = new EventEmitter<ConversationModel>();
|
|
30
|
+
@Output() onCloseAlert = new EventEmitter();
|
|
29
31
|
|
|
30
32
|
convertMessage = convertMessage;
|
|
31
33
|
isApp: boolean = false;
|
|
@@ -36,6 +38,10 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
36
38
|
public PROJECT_FOR_PANEL: any;
|
|
37
39
|
public archive_btn_tooltip: string;
|
|
38
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;
|
|
39
45
|
|
|
40
46
|
tooltip_options = {
|
|
41
47
|
'show-delay': 0,
|
|
@@ -61,7 +67,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
61
67
|
private appConfigProvider: AppConfigProvider,
|
|
62
68
|
private sanitizer: DomSanitizer,
|
|
63
69
|
public tiledeskAuthService: TiledeskAuthService,
|
|
64
|
-
|
|
70
|
+
public alertController: AlertController
|
|
71
|
+
|
|
65
72
|
) {
|
|
66
73
|
super(iterableDiffers, kvDiffers)
|
|
67
74
|
this.setMomentLocale();
|
|
@@ -88,23 +95,58 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
88
95
|
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
89
96
|
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
90
97
|
this.translateLbls();
|
|
91
|
-
|
|
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
|
|
|
95
121
|
translateLbls() {
|
|
96
122
|
this.translate.get('Resolve')
|
|
97
123
|
.subscribe((text: string) => {
|
|
98
|
-
// this.deleteContact_msg = text;
|
|
99
124
|
this.resolve_btn_tooltip = text;
|
|
100
|
-
// console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
|
|
101
|
-
|
|
102
125
|
});
|
|
103
|
-
|
|
126
|
+
|
|
127
|
+
this.translate.get('Archive')
|
|
104
128
|
.subscribe((text: string) => {
|
|
105
|
-
// this.deleteContact_msg = text;
|
|
106
129
|
this.archive_btn_tooltip = text;
|
|
107
|
-
|
|
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;
|
|
108
150
|
});
|
|
109
151
|
}
|
|
110
152
|
|
|
@@ -131,10 +173,29 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
131
173
|
moment.locale(chat_lang)
|
|
132
174
|
}
|
|
133
175
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
+
|
|
138
199
|
}
|
|
139
200
|
|
|
140
201
|
|
|
@@ -158,7 +219,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
158
219
|
// });
|
|
159
220
|
// }
|
|
160
221
|
|
|
161
|
-
|
|
222
|
+
alertClosed() {
|
|
223
|
+
this.onCloseAlert.emit(true)
|
|
224
|
+
}
|
|
162
225
|
|
|
163
226
|
closeConversation(conversation: ConversationModel) {
|
|
164
227
|
var conversationId = conversation.uid;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
<ion-title [class.info-open]="openInfoConversation || openInfoMessage">
|
|
10
10
|
|
|
11
|
-
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr">
|
|
11
|
+
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
|
|
12
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
13
|
-
<div *ngIf="conversationAvatar" class="avatar-container"
|
|
13
|
+
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
14
14
|
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
15
15
|
<app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
|
|
16
16
|
</div>
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
</div>
|
|
31
31
|
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
32
|
-
|
|
32
|
+
<!-- (click)="onOpenCloseInfoConversation()" -->
|
|
33
|
+
<div *ngIf="conversationAvatar" class="tile-info-with"
|
|
33
34
|
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
34
35
|
<!-- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span> -->
|
|
35
36
|
<span class="tile-username">{{ conversation_with_fullname }} </span>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
<ng-container *ngIf="areVisibleCAR">
|
|
44
44
|
<div class="canned-responses-btn-wpr" style="margin-left: -5px;" tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
45
|
-
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()" [disabled]="!IS_SUPPORT_GROUP_CONVERSATION">
|
|
45
|
+
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()" [disabled]="!IS_SUPPORT_GROUP_CONVERSATION || disableTextarea">
|
|
46
46
|
<ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
|
|
47
47
|
</ion-button>
|
|
48
48
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions" placement="top">
|
|
59
|
-
<ion-button ion-button fill="clear" class="upload-image-btn">
|
|
59
|
+
<ion-button ion-button fill="clear" class="upload-image-btn" [disabled]="disableTextarea">
|
|
60
60
|
<ion-icon slot="icon-only" lazy="true" name="attach-outline"
|
|
61
61
|
style="font-size: 30px;transform: rotate(42deg);"></ion-icon>
|
|
62
62
|
<input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false}">
|
|
71
71
|
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
72
72
|
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
73
|
-
[(ngModel)]="messageString" (ionChange)="ionChange($event);"
|
|
73
|
+
[(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
|
|
74
74
|
(keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
|
|
75
75
|
</ion-textarea>
|
|
76
76
|
</div>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -54,6 +54,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
54
54
|
@Output() hasClickedOpenCannedResponses = new EventEmitter<boolean>();
|
|
55
55
|
@Output() eventSendMessage = new EventEmitter<object>();
|
|
56
56
|
@Output() onPresentModalScrollToBottom = new EventEmitter<boolean>();
|
|
57
|
+
@Input() disableTextarea: boolean;
|
|
57
58
|
|
|
58
59
|
public conversationEnabled = false;
|
|
59
60
|
public messageString: string;
|
|
@@ -69,6 +70,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
69
70
|
public IS_SUPPORT_GROUP_CONVERSATION: boolean;
|
|
70
71
|
|
|
71
72
|
TYPE_MSG_TEXT = TYPE_MSG_TEXT;
|
|
73
|
+
msg : string
|
|
72
74
|
|
|
73
75
|
tooltipOptions = {
|
|
74
76
|
'show-delay': 500,
|
|
@@ -123,6 +125,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
123
125
|
// this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
124
126
|
|
|
125
127
|
this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
128
|
+
|
|
126
129
|
}
|
|
127
130
|
|
|
128
131
|
if (this.conversationWith.startsWith("support-group")) {
|
|
@@ -130,7 +133,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
130
133
|
} else {
|
|
131
134
|
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
132
135
|
}
|
|
133
|
-
|
|
136
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
|
|
134
137
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
135
138
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
136
139
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges areVisibleCAR; ", this.areVisibleCAR);
|
|
@@ -269,6 +272,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
269
272
|
|
|
270
273
|
let content = event.clipboardData.getData('text/plain');
|
|
271
274
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onPaste content ", content);
|
|
275
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onPaste this.messageString ", this.messageString);
|
|
276
|
+
this.msg = this.messageString
|
|
272
277
|
setTimeout(() => {
|
|
273
278
|
this.messageString = "";
|
|
274
279
|
}, 100);
|
|
@@ -301,6 +306,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
301
306
|
|
|
302
307
|
onFileSelected(e: any) {
|
|
303
308
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - onFileSelected event', e);
|
|
309
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] - onFileSelected this.messageString ", this.messageString);
|
|
310
|
+
this.msg = this.messageString
|
|
311
|
+
setTimeout(() => {
|
|
312
|
+
this.messageString = "";
|
|
313
|
+
}, 100);
|
|
304
314
|
this.presentModal(e);
|
|
305
315
|
|
|
306
316
|
}
|
|
@@ -339,7 +349,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
339
349
|
}
|
|
340
350
|
// this.logger.log('presentModal e.target.files.length', e.target.files.length);
|
|
341
351
|
|
|
342
|
-
const attributes = { files: dataFiles, enableBackdropDismiss: false };
|
|
352
|
+
const attributes = { files: dataFiles, enableBackdropDismiss: false , msg: this.msg};
|
|
343
353
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] attributes', attributes);
|
|
344
354
|
const modal: HTMLIonModalElement =
|
|
345
355
|
await this.modalController.create({
|