@chat21/chat21-ionic 3.0.58 → 3.0.59-rc4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +4 -0
  3. package/package.json +1 -1
  4. package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
  5. package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
  6. package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
  7. package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
  8. package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
  9. package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
  10. package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
  11. package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
  12. package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
  13. package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
  14. package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
  15. package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
  16. package/resources/Android/splash.png +0 -0
  17. package/src/app/app-routing.module.ts +21 -17
  18. package/src/app/app.component.html +6 -3
  19. package/src/app/app.component.ts +195 -41
  20. package/src/app/app.module.ts +4 -1
  21. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +4 -4
  22. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +8 -2
  23. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +6 -1
  24. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -2
  25. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +47 -2
  26. package/src/app/chatlib/conversation-detail/message/image/image.component.html +7 -6
  27. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +20 -1
  28. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +34 -5
  29. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +8 -144
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -18
  31. package/src/app/components/authentication/login/login.component.html +2 -2
  32. package/src/app/components/authentication/login/login.component.ts +2 -1
  33. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
  34. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +1 -1
  35. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +17 -12
  36. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +12 -0
  37. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +21 -5
  38. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -2
  39. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +22 -17
  40. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -5
  41. package/src/app/components/image-viewer/image-viewer.component.html +23 -0
  42. package/src/app/components/image-viewer/image-viewer.component.scss +107 -0
  43. package/src/app/components/image-viewer/image-viewer.component.spec.ts +24 -0
  44. package/src/app/components/image-viewer/image-viewer.component.ts +38 -0
  45. package/src/app/components/project-item/project-item.component.html +102 -0
  46. package/src/app/components/project-item/project-item.component.scss +542 -0
  47. package/src/app/components/project-item/project-item.component.spec.ts +24 -0
  48. package/src/app/components/project-item/project-item.component.ts +308 -0
  49. package/src/app/components/utils/avatar-profile/avatar-profile.component.html +7 -0
  50. package/src/app/components/utils/avatar-profile/avatar-profile.component.ts +22 -5
  51. package/src/app/pages/authentication/login/login.page.ts +1 -1
  52. package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -3
  53. package/src/app/pages/conversation-detail/conversation-detail.page.ts +122 -30
  54. package/src/app/pages/conversations-list/conversations-list.page.html +40 -24
  55. package/src/app/pages/conversations-list/conversations-list.page.scss +146 -1
  56. package/src/app/pages/conversations-list/conversations-list.page.ts +80 -6
  57. package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
  58. package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
  59. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +14 -0
  60. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -0
  61. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
  62. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +105 -0
  63. package/src/app/services/nav-proxy.service.ts +1 -1
  64. package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
  65. package/src/app/services/websocket/websocket-js.ts +559 -0
  66. package/src/app/services/websocket/websocket.service.spec.ts +12 -0
  67. package/src/app/services/websocket/websocket.service.ts +274 -0
  68. package/src/app/shared/shared.module.ts +7 -1
  69. package/src/assets/i18n/en.json +8 -1
  70. package/src/assets/i18n/it.json +8 -1
  71. package/src/chat21-core/providers/chat-manager.ts +3 -3
  72. package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
  73. package/src/chat21-core/providers/firebase/firebase-auth-service.ts +6 -6
  74. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
  75. package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
  76. package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -2
  77. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +1 -1
  78. package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
  79. package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +1 -1
  80. package/src/chat21-core/utils/utils.ts +1 -1
@@ -21,8 +21,6 @@
21
21
  --padding-start: 0;
22
22
  --padding-end: 0;
23
23
  }
24
-
25
-
26
24
  }
27
25
  .buttons-right {
28
26
  position: absolute;
@@ -56,7 +54,7 @@
56
54
  // min-height: 30px;
57
55
  min-height: 37px; // NK edited
58
56
  max-height: 184px;
59
- background-color: rgba(0, 0, 0, .05);
57
+ background-color: rgba(0, 0, 0, 0.05);
60
58
  // --padding-top: 5px; // NK edited
61
59
  --padding-top: 8px;
62
60
  --padding-bottom: 5px;
@@ -69,21 +67,21 @@
69
67
  }
70
68
  }
71
69
 
72
- #fileInput{
70
+ #fileInput {
73
71
  position: absolute;
74
72
  opacity: 0;
75
- }
76
-
77
- #file-input {
73
+ }
74
+
75
+ #file-input {
78
76
  // width: 0.1px;
79
77
  // height: 0.1px;
80
78
  opacity: 0;
81
79
  overflow: hidden;
82
80
  position: absolute;
83
81
  // z-index: -1;
84
- }
82
+ }
85
83
 
86
- .upload-image-btn {
84
+ .upload-image-btn {
87
85
  // margin-bottom: 0px;
88
86
  // margin-top: 5px;
89
87
  // margin-left: 0px;
@@ -99,21 +97,28 @@
99
97
  --border-radius: 50%;
100
98
  --padding-end: 1px;
101
99
  --padding-start: 1px;
102
-
100
+
103
101
  height: 33px !important;
104
- }
102
+ }
105
103
 
106
- .upload-image-btn .button-native {
107
- border-radius: 50%;
108
- }
104
+ .upload-image-btn .button-native {
105
+ border-radius: 50%;
106
+ }
107
+
108
+ .send-msg-activated {
109
+ color: #3880ff !important;
110
+ }
109
111
 
112
+ .send-msg-disabled {
113
+ cursor: default;
114
+ opacity: 0.8;
115
+ pointer-events: none;
116
+ }
110
117
 
111
118
  // input[placeholder] { text-overflow: ellipsis; }
112
119
  // ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
113
120
  // input:-moz-placeholder { text-overflow: ellipsis; }
114
121
 
115
-
116
-
117
122
  // #ion-textarea > div > textarea[placeholder]{ text-overflow: ellipsis; }
118
123
  // #ion-textarea > div > textarea:-moz-placeholder { text-overflow: ellipsis; }
119
- // ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
124
+ // ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
@@ -43,6 +43,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
43
43
  @Input() loggedUser: UserModel;
44
44
  @Input() conversationWith: string;
45
45
  @Input() tagsCannedFilter: any = [];
46
+
46
47
  @Input() events: Observable<void>;
47
48
  @Input() fileUploadAccept: string
48
49
  @Input() isOpenInfoConversation: boolean;
@@ -102,6 +103,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
102
103
 
103
104
 
104
105
  ngOnChanges() {
106
+
105
107
  if (this.translationMap) {
106
108
  this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
107
109
  this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
@@ -110,6 +112,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
110
112
 
111
113
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
112
114
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
115
+ this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] this.tagsCannedFilter.length ', this.tagsCannedFilter.length)
116
+
113
117
  // use case drop
114
118
  if (this.dropEvent) {
115
119
  this.presentModal(this.dropEvent)
@@ -136,11 +140,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
136
140
 
137
141
  const elTextAreaWrapper = elTextArea.children[0]
138
142
  // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextAreaWrapper", elTextAreaWrapper);
139
-
143
+
140
144
  if (elTextAreaWrapper.children.length === 1) {
141
145
  const elNativeTearea = elTextAreaWrapper.children[0]
142
146
  // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elNativeTearea", elNativeTearea);
143
- elNativeTearea.setAttribute("style", "height: 37px !important; ");
147
+ elNativeTearea.setAttribute("style", "height: 37px !important; ");
144
148
  }
145
149
  }
146
150
 
@@ -481,7 +485,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
481
485
  // if the message is not empty it is passed to the control method
482
486
  // ------------------------------------------------------------------------
483
487
  onKeydown(e: any, text: string) {
488
+ this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - onKeydown in MSG-TEXT-AREA event", e)
489
+ this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - onKeydown in MSG-TEXT-AREA text", text)
484
490
  e.preventDefault(); // Prevent press enter from creating new line
491
+ // console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * event: ", e);
485
492
 
486
493
  this.countClicks++;
487
494
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - countClicks: ', this.countClicks);
@@ -489,9 +496,18 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
489
496
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target: ', e.target);
490
497
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target textContent: ', e.target.textContent);
491
498
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter: ', this.tagsCannedFilter);
499
+
492
500
  // this.logger.error("[CONVS-DETAIL][MSG-TEXT-AREA] pressedOnKeyboard e.keyCode ", e.keyCode);
501
+ // this.events.subscribe((cannedmessage) => {
502
+
503
+ // console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * cannedmessage: ", cannedmessage);
504
+ // });
505
+
506
+ // user and time are the same arguments passed in `events.publish(user, time)`
507
+
493
508
 
494
- const message = e.target.textContent.trim();
509
+
510
+ let message = e.target.textContent.trim();
495
511
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target textContent (message): ', message);
496
512
  // e.inputType === 'insertLineBreak' &&
497
513
  if (e.inputType === 'insertLineBreak' && message === '') {
@@ -501,13 +517,37 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
501
517
  } else {
502
518
  var pos = text.lastIndexOf("/");
503
519
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - POSITION OF '/': ", pos);
520
+ this.logger.log("[CONVS-DETAIL] returnChangeTextArea onKeydown in msg-texarea POSITION OF '/': ", pos);
521
+ this.logger.log("[CONVS-DETAIL] returnChangeTextArea onKeydown in msg-texarea this.tagsCannedFilter.length': ", this.tagsCannedFilter.length);
504
522
  if (!text.includes("/")) {
505
523
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 1 message: ', message);
524
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 1 message: ", message);
506
525
  this.messageString = '';
507
526
  this.sendMessage(text);
508
527
  this.countClicks = 0
509
- } else if (text.includes("/") && pos >= 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0) {
528
+ } else if (text.includes("/") && pos === 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0) {
510
529
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 2: ', this.tagsCannedFilter.length);
530
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 message: ", message);
531
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message value: ', message.value);
532
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 text: ', text);
533
+
534
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
535
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
536
+ this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
537
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
538
+ this.messageString = '';
539
+
540
+ this.sendMessage(text);
541
+ this.countClicks = 0
542
+ } else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/' ) {
543
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
544
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
545
+ // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message value: ', message.value);
546
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 text: ', text);
547
+
548
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
549
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
550
+ this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
511
551
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
512
552
  this.messageString = '';
513
553
 
@@ -516,6 +556,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
516
556
  } else if (text.includes("/") && this.tagsCannedFilter.length === 0) {
517
557
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
518
558
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message: ', message);
559
+ this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
519
560
  this.messageString = '';
520
561
 
521
562
  this.sendMessage(text);
@@ -586,7 +627,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
586
627
  if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
587
628
 
588
629
 
589
-
630
+
590
631
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED COMBO KEYS this.messageString', this.messageString);
591
632
 
592
633
  if (this.messageString !== undefined && this.messageString.trim() !== '') {
@@ -0,0 +1,23 @@
1
+ <div id="image-viewer-modal" class="modal">
2
+
3
+ <!-- The Close Button -->
4
+ <span class="close" (click)="closeImageViewerModal()">
5
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
6
+ <path d="M0 0h24v24H0z" fill="none" />
7
+ <path
8
+ d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
9
+ </svg>
10
+ </span>
11
+ <span class="download-image" (click)="downloadImage()">
12
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
13
+ <path d="M0 0h24v24H0z" fill="none" />
14
+ <path
15
+ d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" />
16
+ </svg>
17
+ </span>
18
+ <!-- Modal Content (The Image) [src]="metadata.src"-->
19
+ <img class="modal-content" id="image-viewer-img">
20
+
21
+ <!-- Modal Caption (Image Text) -->
22
+ <div id="caption"></div>
23
+ </div>
@@ -0,0 +1,107 @@
1
+ // --- MODAL PREVIEW IMAGE
2
+ .modal {
3
+ display: none; /* Hidden by default */
4
+ position: fixed; /* Stay in place */
5
+ z-index: 1050; /* Sit on top */
6
+ padding-top: 100px; /* Location of the box */
7
+ left: 0;
8
+ top: 0;
9
+ width: 100%; /* Full width */
10
+ height: 100%; /* Full height */
11
+ overflow: auto; /* Enable scroll if needed */
12
+ background-color: rgb(0,0,0); /* Fallback color */
13
+ background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
14
+ }
15
+
16
+ /* Modal Content (Image) */
17
+ .modal-content {
18
+ margin: auto;
19
+ display: block;
20
+ // width: 80%;
21
+ // max-width: 700px;
22
+ padding: 0px 5px;
23
+ }
24
+
25
+ /* Caption of Modal Image (Image Text) - Same Width as the Image */
26
+ #caption {
27
+ margin: auto;
28
+ display: block;
29
+ width: 80%;
30
+ max-width: 700px;
31
+ text-align: center;
32
+ color: #ccc;
33
+ padding: 10px 0;
34
+ height: 150px;
35
+ }
36
+
37
+ /* Add Animation - Zoom in the Modal */
38
+ .modal-content, #caption {
39
+ animation-name: zoom;
40
+ // animation-duration: 0.6s;
41
+ }
42
+
43
+ @keyframes zoom {
44
+ from {transform:scale(0)}
45
+ to {transform:scale(1)}
46
+ }
47
+
48
+ /* The Close Button */
49
+ .close {
50
+ position: absolute;
51
+ top: 15px;
52
+ right: 35px;
53
+ // color: #f1f1f1;
54
+ // font-size: 40px;
55
+ // font-weight: bold;
56
+ transition: 0.3s;
57
+ border-radius: 50px;
58
+ padding:7px 8.5px
59
+ }
60
+
61
+ .close svg {
62
+ background-color: transparent;
63
+ fill: rgba(255,255,255,.5);
64
+ }
65
+
66
+ .close:hover,
67
+ .close:focus {
68
+ // color: #bbb;
69
+ background-color: rgba(255,255,255,.3);
70
+ text-decoration: none;
71
+ cursor: pointer;
72
+ svg {
73
+ fill: rgba(255,255,255);
74
+ }
75
+ }
76
+
77
+ .download-image {
78
+ position: absolute;
79
+ top: 15px;
80
+ right: 78px;
81
+ transition: 0.3s;
82
+ border-radius: 50px;
83
+ padding:7px 8.5px
84
+ }
85
+
86
+ .download-image svg {
87
+ background-color: transparent;
88
+ fill: rgba(255,255,255,.5);
89
+ }
90
+
91
+ .download-image:hover,
92
+ .download-image:focus {
93
+
94
+ background-color: rgba(255,255,255,.3);
95
+ text-decoration: none;
96
+ cursor: pointer;
97
+ svg {
98
+ fill: rgba(255,255,255);
99
+ }
100
+ }
101
+
102
+ /* 100% Image Width on Smaller Screens */
103
+ @media only screen and (max-width: 700px){
104
+ .modal-content {
105
+ // width: 100%;
106
+ }
107
+ }
@@ -0,0 +1,24 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { IonicModule } from '@ionic/angular';
3
+
4
+ import { ImageViewerComponent } from './image-viewer.component';
5
+
6
+ describe('ImageViewerComponent', () => {
7
+ let component: ImageViewerComponent;
8
+ let fixture: ComponentFixture<ImageViewerComponent>;
9
+
10
+ beforeEach(async(() => {
11
+ TestBed.configureTestingModule({
12
+ declarations: [ ImageViewerComponent ],
13
+ imports: [IonicModule.forRoot()]
14
+ }).compileComponents();
15
+
16
+ fixture = TestBed.createComponent(ImageViewerComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
19
+ }));
20
+
21
+ it('should create', () => {
22
+ expect(component).toBeTruthy();
23
+ });
24
+ });
@@ -0,0 +1,38 @@
1
+ import { Component, OnInit } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'app-image-viewer',
5
+ templateUrl: './image-viewer.component.html',
6
+ styleUrls: ['./image-viewer.component.scss'],
7
+ })
8
+ export class ImageViewerComponent implements OnInit {
9
+
10
+ constructor() { }
11
+
12
+ ngOnInit() {}
13
+
14
+ closeImageViewerModal() {
15
+ // console.log('HAS CLICKED CLOSE MODAL')
16
+ var modal = document.getElementById("image-viewer-modal");
17
+ // var span = document.getElementsByClassName("close")[0];
18
+ modal.style.display = "none";
19
+ }
20
+
21
+ downloadImage() {
22
+ var modalImg = <HTMLImageElement>document.getElementById("image-viewer-img")
23
+ // console.log('HAS CLICKED CLOSE DWNLD IMG modalImg ', modalImg)
24
+ var modalImgURL = modalImg.src;
25
+ // console.log('HAS CLICKED CLOSE DWNLD IMG modalImgURL ', modalImgURL)
26
+ var captionText = document.getElementById("caption").innerHTML;
27
+ // console.log('HAS CLICKED CLOSE DWNLD IMG captionText ', captionText)
28
+
29
+ const a: any = document.createElement('a');
30
+ a.href = modalImgURL;
31
+ a.download = captionText;
32
+ document.body.appendChild(a);
33
+ a.style = 'display: none';
34
+ a.click();
35
+ a.remove();
36
+ }
37
+
38
+ }
@@ -0,0 +1,102 @@
1
+ <div class="main-content main-content-project-for-panel">
2
+ <div class="container-fluid container-project-for-panel">
3
+
4
+ <div class="left-sidebar">
5
+
6
+ <!-- <loading-spinner *ngIf="showSpinner"></loading-spinner> -->
7
+ <!-- *ngIf="!showSpinner" -->
8
+ <div class="left-sidebar-project" style="margin-right: -10px;">
9
+
10
+ <!-- *ngFor="let project of projects; let i = index" -->
11
+ <div style="cursor:pointer">
12
+ <!-- (click)='goToUnservedRequests(project?.id_project?._id, project?.id_project?.name, project?.id_project?.profile?.name, project?.id_project?.trialExpired, project?.id_project?.trialDaysLeft, project?.id_project?.status)' -->
13
+ <div class="small-projects-sidebar">
14
+ <div *ngIf="project?.id_project?.status !== 0" class="flex-container-project-for-panel project-row">
15
+ <div class="flex-child-left">
16
+ <!-- padding:6px; background: rgb(31,107,192); -->
17
+ <div class="unassigned-notifications-icon-wpr">
18
+ <svg viewBox="0 0 28 28" alt="" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4 fzdkajry" height="40"
19
+ width="40"
20
+ style="vertical-align: middle;border-radius: 50%;">
21
+ <style type="text/css">
22
+ .notifications-icons {
23
+ fill: #050505;
24
+ }
25
+ </style>
26
+ <path class="notifications-icons"
27
+ d="M7.847 23.488C9.207 23.488 11.443 23.363 14.467 22.806 13.944 24.228 12.581 25.247 10.98 25.247 9.649 25.247 8.483 24.542 7.825 23.488L7.847 23.488ZM24.923 15.73C25.17 17.002 24.278 18.127 22.27 19.076 21.17 19.595 18.724 20.583 14.684 21.369 11.568 21.974 9.285 22.113 7.848 22.113 7.421 22.113 7.068 22.101 6.79 22.085 4.574 21.958 3.324 21.248 3.077 19.976 2.702 18.049 3.295 17.305 4.278 16.073L4.537 15.748C5.2 14.907 5.459 14.081 5.035 11.902 4.086 7.022 6.284 3.687 11.064 2.753 15.846 1.83 19.134 4.096 20.083 8.977 20.506 11.156 21.056 11.824 21.986 12.355L21.986 12.356 22.348 12.561C23.72 13.335 24.548 13.802 24.923 15.73Z">
28
+ </path>
29
+ </svg>
30
+ </div>
31
+ <div class="unassigned-notifications-badge">
32
+ <!-- || currentUserRequestCount > 0 -->
33
+ <!-- <span *ngIf="unservedRequestCount > 0 "> -->
34
+ <!-- + currentUserRequestCount -->
35
+ <span class="notification-count">{{ unservedRequestCount }}</span>
36
+ <!-- </span> -->
37
+
38
+ </div>
39
+
40
+ </div>
41
+
42
+
43
+ <div class="flex-child-right" *ngIf="!window_width_is_60">
44
+ <div class="project-name-project-for-panel">
45
+ {{ project?.id_project?.name }}
46
+ </div>
47
+
48
+ <!-- <div class="status--text"
49
+ (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)"
50
+ [ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
51
+ <span *ngIf="project?.ws_projct_user_available === true">
52
+ Online
53
+ </span>
54
+ <span *ngIf="project?.ws_projct_user_available === false">
55
+ Offline
56
+ </span>
57
+ <span class="status--icon-project-for-panel"
58
+ [ngStyle]="{ 'background-color':(project?.ws_projct_user_available)?'#4caf50':'#f44336' }">
59
+ </span>
60
+ <span class="status--icon-project-for-panel busy--icon"
61
+ *ngIf="project?.ws_projct_user_isBusy === true">
62
+ </span>
63
+ </div> -->
64
+ <div class="availabily-and-busy-wpr">
65
+ <div class="onoffswitch"
66
+ (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
67
+ <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch"
68
+ tabindex="0" [checked]="project?.ws_projct_user_available">
69
+ <label class="onoffswitch-label" for="myonoffswitch"></label>
70
+ </div>
71
+
72
+ <span *ngIf="project?.ws_projct_user_available === true" class="availibility-status-text"
73
+ [ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}"
74
+ (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
75
+ {{translationMap.get('Available') }}
76
+ </span>
77
+ <span *ngIf="project?.ws_projct_user_available === false" class="availibility-status-text"
78
+ [ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}"
79
+ (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
80
+ {{translationMap.get('Unavailable')}}
81
+ </span>
82
+ <div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true">
83
+ <span class="material-icons project-item--isBusy-icon">
84
+ access_time
85
+ </span>
86
+ </div>
87
+ <span *ngIf="project?.ws_projct_user_isBusy === true" class="project-item--isBusy-busy-text text-pulse-animation">
88
+ {{translationMap.get('Busy')}}
89
+ </span>
90
+ </div>
91
+
92
+ </div>
93
+
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>