@chat21/chat21-ionic 3.0.80 → 3.0.81-rc.2
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 +75 -3
- package/README.md +2 -2
- package/angular.json +1 -0
- package/deploy_amazon_beta.sh +29 -0
- package/deploy_amazon_prod.sh +30 -0
- package/package.json +2 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +18 -2
- package/src/app/app.component.ts +113 -17
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +77 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +168 -86
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -25
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +62 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +9 -8
- package/src/app/components/canned-response/canned-response.component.scss +24 -2
- package/src/app/components/canned-response/canned-response.component.ts +5 -5
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -6
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +25 -87
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
- package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +189 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +42 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +40 -23
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +184 -117
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +2 -26
- package/src/app/shared/shared.module.ts +24 -33
- package/src/assets/i18n/ar.json +278 -265
- package/src/assets/i18n/az.json +14 -1
- package/src/assets/i18n/de.json +15 -2
- package/src/assets/i18n/en.json +15 -2
- package/src/assets/i18n/es.json +15 -2
- package/src/assets/i18n/fr.json +14 -1
- package/src/assets/i18n/it.json +14 -1
- package/src/assets/i18n/kk.json +15 -2
- package/src/assets/i18n/pt.json +15 -2
- package/src/assets/i18n/ru.json +14 -1
- package/src/assets/i18n/sr.json +277 -264
- package/src/assets/i18n/sv.json +15 -2
- package/src/assets/i18n/tr.json +15 -2
- package/src/assets/i18n/uk.json +15 -2
- package/src/assets/i18n/uz.json +14 -1
- package/src/assets/js/chat21client.js +177 -149
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-native-mqtt.json +5 -1
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/utils/constants.ts +6 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +38 -10
- package/src/global.scss +52 -56
- package/src/index.html +2 -2
- package/src/variables.scss +30 -10
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
2
|
import { IonicModule } from '@ionic/angular';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { HeaderConversationsList } from './header-conversations-list.component';
|
|
5
5
|
|
|
6
|
-
describe('
|
|
7
|
-
let component:
|
|
8
|
-
let fixture: ComponentFixture<
|
|
6
|
+
describe('ConversationsListHeader', () => {
|
|
7
|
+
let component: HeaderConversationsList;
|
|
8
|
+
let fixture: ComponentFixture<HeaderConversationsList>;
|
|
9
9
|
|
|
10
10
|
beforeEach(async(() => {
|
|
11
11
|
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [
|
|
12
|
+
declarations: [ HeaderConversationsList ],
|
|
13
13
|
imports: [IonicModule.forRoot()]
|
|
14
14
|
}).compileComponents();
|
|
15
15
|
|
|
16
|
-
fixture = TestBed.createComponent(
|
|
16
|
+
fixture = TestBed.createComponent(HeaderConversationsList);
|
|
17
17
|
component = fixture.componentInstance;
|
|
18
18
|
fixture.detectChanges();
|
|
19
19
|
}));
|
|
@@ -4,22 +4,22 @@ import { EventsService } from 'src/app/services/events-service'
|
|
|
4
4
|
import { CreateTicketPage } from 'src/app/pages/create-ticket/create-ticket.page'
|
|
5
5
|
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service'
|
|
6
6
|
@Component({
|
|
7
|
-
selector: '
|
|
8
|
-
templateUrl: './
|
|
9
|
-
styleUrls: ['./
|
|
7
|
+
selector: 'header-conversations-list',
|
|
8
|
+
templateUrl: './header-conversations-list.component.html',
|
|
9
|
+
styleUrls: ['./header-conversations-list.component.scss'],
|
|
10
10
|
})
|
|
11
|
-
export class
|
|
11
|
+
export class HeaderConversationsList implements OnInit {
|
|
12
12
|
|
|
13
13
|
@Input() numberOpenConv: number
|
|
14
14
|
@Input() supportMode: boolean
|
|
15
15
|
@Input() archived_btn: boolean
|
|
16
16
|
@Input() writeto_btn: boolean
|
|
17
|
-
@Input() sound_btn: string
|
|
17
|
+
@Input() sound_btn: string;
|
|
18
|
+
@Input() isMobile: boolean;
|
|
18
19
|
@Output() onSoundChange = new EventEmitter<string>()
|
|
19
20
|
@Output() openContactsDirectory = new EventEmitter()
|
|
20
21
|
@Output() openProfileInfo = new EventEmitter()
|
|
21
22
|
|
|
22
|
-
IS_ON_MOBILE_DEVICE: boolean
|
|
23
23
|
createTicketModal = null
|
|
24
24
|
public translationMap: Map<string, string>;
|
|
25
25
|
tooltipOptions = {
|
|
@@ -36,7 +36,7 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
36
36
|
public modalController: ModalController,
|
|
37
37
|
private translateService: CustomTranslateService,
|
|
38
38
|
) {
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
this.translations();
|
|
41
41
|
// this.listenToCloseCreateTicketModal() // published from create ticket page
|
|
42
42
|
}
|
|
@@ -68,15 +68,6 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
68
68
|
// }
|
|
69
69
|
// }
|
|
70
70
|
|
|
71
|
-
isOnMobileDevice() {
|
|
72
|
-
this.IS_ON_MOBILE_DEVICE = false
|
|
73
|
-
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
74
|
-
this.IS_ON_MOBILE_DEVICE = true
|
|
75
|
-
}
|
|
76
|
-
// console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
77
|
-
return this.IS_ON_MOBILE_DEVICE
|
|
78
|
-
}
|
|
79
|
-
|
|
80
71
|
ngOnInit() {
|
|
81
72
|
// console.log('DDP HEADER SUPPORT MODE ', this.supportMode)
|
|
82
73
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<ion-toolbar [class.mobile]="isMobile">
|
|
2
|
+
|
|
3
|
+
<ion-buttons slot="start">
|
|
4
|
+
<ion-button ion-button (click)="onBackButtonHandler()">
|
|
5
|
+
<ion-icon slot="icon-only" name="arrow-back-outline"></ion-icon>
|
|
6
|
+
</ion-button>
|
|
7
|
+
</ion-buttons>
|
|
8
|
+
|
|
9
|
+
<ion-title> {{headerTitle}}</ion-title>
|
|
10
|
+
|
|
11
|
+
</ion-toolbar>
|
|
12
|
+
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
2
|
import { IonicModule } from '@ionic/angular';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { HeaderConversationsListArchived } from './header-conversations-list-archived.component';
|
|
5
5
|
|
|
6
6
|
describe('OptionHeaderComponent', () => {
|
|
7
|
-
let component:
|
|
8
|
-
let fixture: ComponentFixture<
|
|
7
|
+
let component: HeaderConversationsListArchived;
|
|
8
|
+
let fixture: ComponentFixture<HeaderConversationsListArchived>;
|
|
9
9
|
|
|
10
10
|
beforeEach(async(() => {
|
|
11
11
|
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [
|
|
12
|
+
declarations: [ HeaderConversationsListArchived ],
|
|
13
13
|
imports: [IonicModule.forRoot()]
|
|
14
14
|
}).compileComponents();
|
|
15
15
|
|
|
16
|
-
fixture = TestBed.createComponent(
|
|
16
|
+
fixture = TestBed.createComponent(HeaderConversationsListArchived);
|
|
17
17
|
component = fixture.componentInstance;
|
|
18
18
|
fixture.detectChanges();
|
|
19
19
|
}));
|
|
@@ -2,13 +2,14 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
selector: '
|
|
6
|
-
templateUrl: './
|
|
7
|
-
styleUrls: ['./
|
|
5
|
+
selector: 'header-conversations-list-archived',
|
|
6
|
+
templateUrl: './header-conversations-list-archived.component.html',
|
|
7
|
+
styleUrls: ['./header-conversations-list-archived.component.scss'],
|
|
8
8
|
})
|
|
9
|
-
export class
|
|
9
|
+
export class HeaderConversationsListArchived implements OnInit {
|
|
10
10
|
|
|
11
11
|
@Input() headerTitle: string
|
|
12
|
+
@Input() isMobile: boolean;
|
|
12
13
|
@Output() onBackButton = new EventEmitter<boolean>();
|
|
13
14
|
static UserPresenceComponent: any[] | any;
|
|
14
15
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<ion-navbar class="navbar navbar-absolute">
|
|
2
|
+
<div class="container-fluid">
|
|
3
|
+
<!-- <div class="navbar-left">
|
|
4
|
+
left
|
|
5
|
+
</div> -->
|
|
6
|
+
<div class="navbar-right">
|
|
7
|
+
<!-- test site -->
|
|
8
|
+
<ng-container *ngIf="project">
|
|
9
|
+
<button class="btn simulate-visitor-btn btn-success-no-boxshadow " (click)="testWidgetPage()">
|
|
10
|
+
<i class="material-icons" style="padding-top: 0px;font-size: 24px;">play_arrow</i>
|
|
11
|
+
{{translationsMap.get('NAVBAR.SIMULATE_VISITOR')}}
|
|
12
|
+
</button>
|
|
13
|
+
</ng-container>
|
|
14
|
+
|
|
15
|
+
<!-- ------ PROJECTS DROPDOWN ------ -->
|
|
16
|
+
<ng-container *ngIf="project">
|
|
17
|
+
<li>
|
|
18
|
+
<button class="btn dropdown-toggle project-dropdown" (click)="openDropdownProjects = !openDropdownProjects">
|
|
19
|
+
<i class="material-icons" style="margin-right: 3px;">keyboard_arrow_down</i>
|
|
20
|
+
<span style="text-transform: none"> {{ project?.id_project?.name }} </span>
|
|
21
|
+
</button>
|
|
22
|
+
<div class="ripple-container"></div>
|
|
23
|
+
<div id="navbar_dropdown" class="dropdown-menu" [ngClass]="{'open': openDropdownProjects}">
|
|
24
|
+
|
|
25
|
+
<!-- PROJECT SETTINGS -->
|
|
26
|
+
<!-- <li *ngIf="USER_ROLE !== 'agent'">
|
|
27
|
+
<a (click)="onClickDropdownOption('projectSettings')">
|
|
28
|
+
<i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">settings</i>
|
|
29
|
+
{{translationsMap?.get('NAVBAR.PROJECT_SETTINGS')}}
|
|
30
|
+
</a>
|
|
31
|
+
</li> -->
|
|
32
|
+
|
|
33
|
+
<!-- ALL PROJECTS -->
|
|
34
|
+
<li (click)="onClickDropdownOption('allProjects')">
|
|
35
|
+
<a style="cursor: pointer">
|
|
36
|
+
<i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">view_list</i>
|
|
37
|
+
{{translationsMap?.get('NAVBAR.VIEW_ALL_PROJECTS')}}
|
|
38
|
+
</a>
|
|
39
|
+
</li>
|
|
40
|
+
|
|
41
|
+
<!-- ADD PROJECT -->
|
|
42
|
+
<li id="navbar_create_prjct" *ngIf="MT === true" (click)="onClickDropdownOption('addProject')">
|
|
43
|
+
<a style="cursor: pointer">
|
|
44
|
+
<i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">add_circle_outline </i>
|
|
45
|
+
{{translationsMap?.get('NAVBAR.ADD_PROJECT')}}
|
|
46
|
+
</a>
|
|
47
|
+
</li>
|
|
48
|
+
|
|
49
|
+
<li class="divider"></li>
|
|
50
|
+
|
|
51
|
+
<!-- RECENT PROJECTS -->
|
|
52
|
+
<li>
|
|
53
|
+
<span style="padding-left: 24px;font-size: 12px; color: rgb(118,149,165);font-weight: 400">
|
|
54
|
+
{{translationsMap?.get('NAVBAR.RECENT_PROJECTS')}}
|
|
55
|
+
</span>
|
|
56
|
+
</li>
|
|
57
|
+
<!--
|
|
58
|
+
***** ngFor - reverse order of output using the index *****
|
|
59
|
+
Reverse() works in place. It means, it will change the original array.
|
|
60
|
+
Slice without parameters returns a copy of projects, so original array, in this case, stays unchanged.
|
|
61
|
+
let prjct of projects?.reverse()
|
|
62
|
+
-->
|
|
63
|
+
<!-- *ngFor="let prjct of projects?.slice().reverse() | slice:0:5; let i=index" -->
|
|
64
|
+
<li *ngFor="let prjct of projects?.slice() | slice:0:5; let i=index" style="cursor: pointer">
|
|
65
|
+
<a (click)="goToHome(prjct?.id_project?._id, prjct?.id_project?.name)"
|
|
66
|
+
[ngClass]="{'li-selected' : prjct?.id_project?._id === project?.id_project?.id }">
|
|
67
|
+
|
|
68
|
+
<span> {{ prjct?.id_project?.name }} </span>
|
|
69
|
+
</a>
|
|
70
|
+
</li>
|
|
71
|
+
|
|
72
|
+
<ng-container *ngIf="projects?.length > 5">
|
|
73
|
+
<li class="divider"></li>
|
|
74
|
+
<li>
|
|
75
|
+
<span style="padding-left: 24px;font-size: 12px; color: rgb(118,149,165);font-weight: 400">
|
|
76
|
+
{{translationsMap?.get('NAVBAR.OTHER_PROJECTS')}}
|
|
77
|
+
</span>
|
|
78
|
+
</li>
|
|
79
|
+
|
|
80
|
+
<!-- *ngFor="let prjct of projects?.slice().reverse() | slice:5:10; let i=index" -->
|
|
81
|
+
<li *ngFor="let prjct of projects?.slice() | slice:5:10; let i=index" style="cursor: pointer">
|
|
82
|
+
<a (click)="goToHome(prjct?.id_project?._id, prjct?.id_project?.name)">
|
|
83
|
+
{{ prjct?.id_project?.name }}
|
|
84
|
+
</a>
|
|
85
|
+
</li>
|
|
86
|
+
</ng-container>
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
</li>
|
|
90
|
+
</ng-container>
|
|
91
|
+
|
|
92
|
+
<!-- Sound on / off -->
|
|
93
|
+
<ng-container *ngIf="project">
|
|
94
|
+
<button class="btn volume" style="cursor: pointer;" *ngIf="isSoundEnabled" (click)="onClickSound('disabled')">
|
|
95
|
+
<i class="material-icons">volume_up</i>
|
|
96
|
+
</button>
|
|
97
|
+
<button class="btn volume" style="cursor: pointer;" *ngIf="!isSoundEnabled" (click)="onClickSound('enabled')">
|
|
98
|
+
<i class="material-icons">volume_off</i>
|
|
99
|
+
</button>
|
|
100
|
+
</ng-container>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</ion-navbar>
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
.navbar-absolute{
|
|
2
|
+
position: absolute;
|
|
3
|
+
width: calc(100% - var(--sidebar-width));
|
|
4
|
+
margin-left: var(--sidebar-width);
|
|
5
|
+
padding-top: 5px;
|
|
6
|
+
z-index: 1;
|
|
7
|
+
padding-bottom: 5px;
|
|
8
|
+
border-bottom: 1px solid #e7e7e7;
|
|
9
|
+
top: 0;
|
|
10
|
+
|
|
11
|
+
-webkit-font-smoothing: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.navbar{
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
color: #555;
|
|
17
|
+
min-height: var(--nav-bar-heigth);
|
|
18
|
+
transition: all 150ms ease 0s;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container-fluid{
|
|
22
|
+
padding-right: 15px;
|
|
23
|
+
padding-left: 15px;
|
|
24
|
+
margin-right: auto;
|
|
25
|
+
margin-left: auto;
|
|
26
|
+
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ion-navbar{
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.navbar-collapse{
|
|
36
|
+
border-top: none;
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
|
|
39
|
+
padding-right: 15px;
|
|
40
|
+
padding-left: 15px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.navbar-right{
|
|
44
|
+
float: right;
|
|
45
|
+
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.navbar-left{
|
|
51
|
+
float: left;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.simulate-visitor-btn{
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
padding: 0px 11px 0px 4px !important;
|
|
57
|
+
max-height: 24px;
|
|
58
|
+
border-radius: 30px;
|
|
59
|
+
font-family: 'Poppins';
|
|
60
|
+
|
|
61
|
+
box-shadow: unset!important;
|
|
62
|
+
text-transform: none!important;
|
|
63
|
+
background: #3ecf8e!important;
|
|
64
|
+
color: #fff;
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.btn{
|
|
69
|
+
display: flex;
|
|
70
|
+
position: relative;
|
|
71
|
+
flex-flow: row nowrap;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
|
|
75
|
+
border: 1px solid transparent;
|
|
76
|
+
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
.dropdown-toggle, .volume{
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
color: inherit;
|
|
83
|
+
|
|
84
|
+
padding: 0px 15px;
|
|
85
|
+
font-weight: 400;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.project-dropdown {
|
|
89
|
+
max-width: 180px;
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
li{
|
|
97
|
+
position: relative;
|
|
98
|
+
display: block
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.dropdown-menu {
|
|
102
|
+
border-radius: 3px;
|
|
103
|
+
box-shadow: 0 2px 5px 0 rgb(0, 0, 0, 0.26);
|
|
104
|
+
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 100%;
|
|
107
|
+
right: 0;
|
|
108
|
+
left: auto;
|
|
109
|
+
z-index: 1000;
|
|
110
|
+
display: none;
|
|
111
|
+
float: left;
|
|
112
|
+
min-width: 160px;
|
|
113
|
+
padding: 5px 0;
|
|
114
|
+
margin: 2px 0 0;
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
text-align: left;
|
|
117
|
+
list-style: none;
|
|
118
|
+
background-color: #fff;
|
|
119
|
+
-webkit-background-clip: padding-box;
|
|
120
|
+
background-clip: padding-box;
|
|
121
|
+
}
|
|
122
|
+
.dropdown-menu{
|
|
123
|
+
max-height: 240px;
|
|
124
|
+
overflow-y: auto;
|
|
125
|
+
}
|
|
126
|
+
.dropdown-menu:not(.open){
|
|
127
|
+
margin-top: -20px;
|
|
128
|
+
opacity: 0;
|
|
129
|
+
visibility: hidden;
|
|
130
|
+
display: block;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.dropdown-menu.open{
|
|
134
|
+
margin-top: 12px; //0;
|
|
135
|
+
opacity: 1;
|
|
136
|
+
visibility: visible;
|
|
137
|
+
display: block;
|
|
138
|
+
transition: all 150ms linear;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dropdown-menu li {
|
|
142
|
+
position: relative;
|
|
143
|
+
|
|
144
|
+
.li-selected{
|
|
145
|
+
color: #4285f4;
|
|
146
|
+
background-color: #eee;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.dropdown-menu .divider{
|
|
151
|
+
background-color: rgba(0,0,0,.12);
|
|
152
|
+
margin: 5px 0;
|
|
153
|
+
|
|
154
|
+
height: 1px;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.dropdown-menu li>a{
|
|
159
|
+
font-size: 13px;
|
|
160
|
+
padding: 10px 20px;
|
|
161
|
+
margin: 0 5px;
|
|
162
|
+
border-radius: 2px;
|
|
163
|
+
transition: all 150ms linear;
|
|
164
|
+
|
|
165
|
+
display: block;
|
|
166
|
+
clear: both;
|
|
167
|
+
font-weight: 400;
|
|
168
|
+
line-height: 1.42857143;
|
|
169
|
+
color: #333;
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
text-decoration: none;
|
|
172
|
+
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
|
|
175
|
+
.material-icons {
|
|
176
|
+
vertical-align: middle;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:hover{
|
|
180
|
+
background-color: #3ea9f5;
|
|
181
|
+
color: #fff;
|
|
182
|
+
box-shadow: 0 12px 20px -10px rgba(62, 169, 245, 0.28), 0 4px 20px 0 rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(62, 169, 245, 0.2);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
.material-icons {
|
|
188
|
+
font-family: "Material Icons";
|
|
189
|
+
font-weight: 400;
|
|
190
|
+
font-style: normal;
|
|
191
|
+
font-size: 24px;
|
|
192
|
+
line-height: 1;
|
|
193
|
+
letter-spacing: normal;
|
|
194
|
+
text-transform: none;
|
|
195
|
+
display: inline-block;
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
word-wrap: normal;
|
|
198
|
+
direction: ltr;
|
|
199
|
+
-webkit-font-smoothing: antialiased;
|
|
200
|
+
-moz-osx-font-smoothing: grayscale;
|
|
201
|
+
text-rendering: optimizeLegibility;
|
|
202
|
+
font-feature-settings: "liga";
|
|
203
|
+
|
|
204
|
+
top: 0;
|
|
205
|
+
position: relative;
|
|
206
|
+
font-size: 20px;
|
|
207
|
+
vertical-align: middle;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.ripple-container {
|
|
211
|
+
position: absolute;
|
|
212
|
+
top: 0;
|
|
213
|
+
left: 0;
|
|
214
|
+
z-index: 1;
|
|
215
|
+
width: 100%;
|
|
216
|
+
height: 100%;
|
|
217
|
+
overflow: hidden;
|
|
218
|
+
border-radius: inherit;
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
|
|
221
|
+
.disabled &{
|
|
222
|
+
display: none;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
.ripple {
|
|
226
|
+
position: absolute;
|
|
227
|
+
width: 20px;
|
|
228
|
+
height: 20px;
|
|
229
|
+
margin-left: -10px;
|
|
230
|
+
margin-top: -10px;
|
|
231
|
+
border-radius: 100%;
|
|
232
|
+
background-color: #000; // fallback color
|
|
233
|
+
background-color: rgba(0,0,0,0.05);
|
|
234
|
+
transform: scale(1);
|
|
235
|
+
transform-origin: 50%;
|
|
236
|
+
opacity: 0;
|
|
237
|
+
pointer-events: none;
|
|
238
|
+
}
|
|
239
|
+
.ripple.ripple-on {
|
|
240
|
+
transition: opacity 0.15s ease-in 0s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
|
|
241
|
+
opacity: 0.1;
|
|
242
|
+
}
|
|
243
|
+
.ripple.ripple-out {
|
|
244
|
+
transition: opacity 0.1s linear 0s !important;
|
|
245
|
+
opacity: 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
2
|
import { IonicModule } from '@ionic/angular';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { NavbarComponent } from './navbar.component';
|
|
5
5
|
|
|
6
|
-
describe('
|
|
7
|
-
let component:
|
|
8
|
-
let fixture: ComponentFixture<
|
|
6
|
+
describe('NavbarComponent', () => {
|
|
7
|
+
let component: NavbarComponent;
|
|
8
|
+
let fixture: ComponentFixture<NavbarComponent>;
|
|
9
9
|
|
|
10
10
|
beforeEach(async(() => {
|
|
11
11
|
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [
|
|
12
|
+
declarations: [ NavbarComponent ],
|
|
13
13
|
imports: [IonicModule.forRoot()]
|
|
14
14
|
}).compileComponents();
|
|
15
15
|
|
|
16
|
-
fixture = TestBed.createComponent(
|
|
16
|
+
fixture = TestBed.createComponent(NavbarComponent);
|
|
17
17
|
component = fixture.componentInstance;
|
|
18
18
|
fixture.detectChanges();
|
|
19
19
|
}));
|