@chat21/chat21-ionic 3.0.82-rc.3 → 3.0.82-rc.6
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 +4 -0
- package/package.json +1 -1
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +2 -2
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +21 -3
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/assets/js/chat21client.js +2 -2
- package/src/chat-config-mqtt-localhost.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.82-rc.6
|
|
4
|
+
- bug-fixed: axios is undefined in chat21Client.js
|
|
5
|
+
- bug-fixed: if userImage not exist in sidebar--user-detail, no info of fillColor exist
|
|
6
|
+
|
|
3
7
|
### 3.0.82-rc.3
|
|
4
8
|
- bug-fixed: incorrect dashboard urls in navbar
|
|
5
9
|
- changed: used logger in mqtt auth service
|
package/package.json
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
onerror="this.src='assets/images/no_image_user.png'" />
|
|
26
26
|
|
|
27
27
|
<div *ngIf="!USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details"
|
|
28
|
-
[ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.
|
|
28
|
+
[ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.fillColour + ')'}">
|
|
29
29
|
<span id="sidebaravatar-altenative-user-avatar" class="sidebar-user-details-altenative-user-avatar">
|
|
30
|
-
{{ user?.
|
|
30
|
+
{{ user?.fullname_initial }}
|
|
31
31
|
</span>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
@@ -41,7 +41,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
41
41
|
|
|
42
42
|
isVisiblePAY: boolean;
|
|
43
43
|
public_Key: any
|
|
44
|
-
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
44
|
+
USER_PHOTO_PROFILE_EXIST: boolean = false;
|
|
45
45
|
version: string
|
|
46
46
|
company_name: string = 'Tiledesk'
|
|
47
47
|
DASHBOARD_URL: string;
|
|
@@ -90,7 +90,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
90
90
|
const currentUser = JSON.parse(storedCurrentUser);
|
|
91
91
|
this.logger.log('[SIDEBAR-USER-DETAILS] - subcribeToAuthStateChanged - currentUser ', currentUser)
|
|
92
92
|
if (currentUser) {
|
|
93
|
-
this.user = currentUser
|
|
93
|
+
this.user = currentUser
|
|
94
|
+
this.createUserAvatar(this.user);
|
|
94
95
|
this.getCurrentChatLangAndTranslateLabels(this.user);
|
|
95
96
|
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.user.uid)
|
|
96
97
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL);
|
|
@@ -105,7 +106,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
105
106
|
|
|
106
107
|
checkIfExistPhotoProfile(imageUrl) {
|
|
107
108
|
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
108
|
-
|
|
109
|
+
|
|
109
110
|
if (imageExists === true) {
|
|
110
111
|
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
111
112
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
@@ -129,6 +130,23 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
129
130
|
};
|
|
130
131
|
}
|
|
131
132
|
|
|
133
|
+
createUserAvatar(currentUser) {
|
|
134
|
+
this.logger.log('[SIDEBAR] - createProjectUserAvatar ', currentUser)
|
|
135
|
+
let fullname = ''
|
|
136
|
+
if (currentUser && currentUser.firstname && currentUser.lastname) {
|
|
137
|
+
fullname = currentUser.firstname + ' ' + currentUser.lastname
|
|
138
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
139
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
140
|
+
} else if (currentUser && currentUser.firstname) {
|
|
141
|
+
fullname = currentUser.firstname
|
|
142
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
143
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
144
|
+
} else {
|
|
145
|
+
currentUser['fullname_initial'] = 'N/A'
|
|
146
|
+
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
132
150
|
// listenOpenUserSidebarEvent() {
|
|
133
151
|
// this.events.subscribe('userdetailsidebar:opened', (openUserDetailsSidebar) => {
|
|
134
152
|
// this.logger.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
|
|
@@ -41,7 +41,7 @@ export class WebsocketService {
|
|
|
41
41
|
|
|
42
42
|
self.webSocketJs.ref(path, 'subscriptionToWsCurrentUser_allProject',
|
|
43
43
|
function (data, notification) {
|
|
44
|
-
|
|
44
|
+
console.log("[WS-SERV] SUBSCR TO WS CURRENT PROJECT-USER AVAILABILITY - CREATE - data ", data);
|
|
45
45
|
resolve(data)
|
|
46
46
|
// self.currentUserWsAvailability$.next(data.user_available);
|
|
47
47
|
self.currentProjectUserAvailability$.next(data)
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"APIendpoint": "http://localhost:8004/api",
|
|
22
22
|
"_log": true
|
|
23
23
|
},
|
|
24
|
-
"apiUrl": "http://localhost:
|
|
24
|
+
"apiUrl": "http://localhost:8081/api/",
|
|
25
25
|
"baseImageUrl": "http://localhost:3000/",
|
|
26
|
-
"dashboardUrl": "http://localhost:8081/",
|
|
26
|
+
"dashboardUrl": "http://localhost:8081/dashboard/",
|
|
27
27
|
"testsiteBaseUrl": "http://localhost:8081/widget/assets/twp/index.html",
|
|
28
28
|
"logLevel": "DEBUG",
|
|
29
29
|
"authPersistence": "LOCAL",
|