Skip to content

Commit

Permalink
1. fix problem of add or join to conference
Browse files Browse the repository at this point in the history
2. fix problem of exit of conference with stop method in webview
3. append minimize feature in call pop up
4. fix bug of incoming and outgoing name and image of soft phone user
5. create some message for soft phone service
6. fix bug of transfer call
  • Loading branch information
omidkh68 committed Jul 20, 2020
1 parent 613eeaa commit c9c1f78
Show file tree
Hide file tree
Showing 35 changed files with 365 additions and 320 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "office-container",
"description": "Office Container Developed by Angular 9 with Electron (Typescript + SASS + Hot Reload)",
"version": "0.9.9",
"version": "0.9.10",
"author": "Omid Khosrojerdi, Husin Sajjadi",
"repository": {
"type": "github",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div *ngIf="form" class="pos-abs left-0 right-0 top-0 bottom-0 padding-full z-index-99"
[dir]="rtlDirection ? 'rtl' : 'ltr'">
<h1 class="margin-b-full font-full-em text-weight-500">
{{(data.action === 'add' ? 'conference.create_conference' : 'conference.join_conference') | translate}}
{{'conference.create_or_join_conference' | translate}}
</h1>

<a (click)="closeDialog()" [ngClass]="rtlDirection ? 'left-full' : 'right-full'"
Expand All @@ -10,65 +10,44 @@ <h1 class="margin-b-full font-full-em text-weight-500">
</a>

<p class="no-margin font-9-em text-gray-700">
{{(data.action === 'add' ? 'conference.for_create_conf_fill_inputs' : 'conference.for_join_conf_paste_conf_address') | translate}}
{{'conference.for_create_conf_fill_inputs' | translate}}
</p>

<form [formGroup]="form" class="full-height">
<ng-container *ngIf="data.action === 'add'; else joinForm">
<mat-form-field class="full-width font-full-em margin-b-full">
<mat-icon class="text-gray-500" matPrefix>person</mat-icon>
<input type="text"
matInput
class="text-left padding-mini-r-l"
placeholder="{{'login_info.username' | translate}}"
autocomplete="off" required
tabindex="1"
autoFocus
readonly
dir="ltr"
formControlName="username">
<mat-error
*ngIf="!form.get('username').valid && form.get('username').touched">
{{'login_info.username_error' | translate}}
</mat-error>
</mat-form-field>
<mat-form-field class="full-width font-full-em margin-b-full">
<mat-icon class="text-gray-500" matPrefix>person</mat-icon>
<input type="text"
matInput
class="text-left padding-mini-r-l"
placeholder="{{'login_info.username' | translate}}"
autocomplete="off" required
tabindex="1"
autoFocus
readonly
dir="ltr"
formControlName="username">
<mat-error
*ngIf="!form.get('username').valid && form.get('username').touched">
{{'login_info.username_error' | translate}}
</mat-error>
</mat-form-field>

<mat-form-field class="full-width font-full-em margin-b-full">
<mat-icon class="text-gray-500" matPrefix>meeting_room</mat-icon>
<input type="text"
matInput
class="text-left padding-mini-r-l"
placeholder="{{'conference.conf_name' | translate}}"
autocomplete="off" required
tabindex="1"
autoFocus
dir="ltr"
formControlName="confname">
<mat-error
*ngIf="!form.get('confname').valid && form.get('confname').touched">
{{'conference.conf_name_error' | translate}}
</mat-error>
</mat-form-field>
</ng-container>

<ng-template #joinForm>
<mat-form-field class="full-width font-full-em margin-b-full">
<mat-icon class="text-gray-500" matPrefix>content_paste</mat-icon>
<input type="text"
matInput
class="text-left padding-mini-r-l"
placeholder="{{'conference.conf_address' | translate}}"
autocomplete="off" required
tabindex="1"
autoFocus
dir="ltr"
formControlName="confAddress">
<mat-error
*ngIf="!form.get('confAddress').valid && form.get('confAddress').touched">
{{'conference.conf_address_error' | translate}}
</mat-error>
</mat-form-field>
</ng-template>
<mat-form-field class="full-width font-full-em margin-b-full">
<mat-icon class="text-gray-500" matPrefix>meeting_room</mat-icon>
<input type="text"
matInput
class="text-left padding-mini-r-l"
placeholder="{{'conference.conf_name' | translate}}"
autocomplete="off" required
tabindex="1"
autoFocus
dir="ltr"
formControlName="confname">
<mat-error
*ngIf="!form.get('confname').valid && form.get('confname').touched">
{{'conference.conf_name_error' | translate}}
</mat-error>
</mat-form-field>

<button mat-raised-button
[disabled]="!form.valid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ export class ConferenceAddComponent extends LoginDataClass implements OnInit {
}

createForm() {
if (this.data.action === 'add') {
this.form = this._fb.group({
username: new FormControl(this.loggedInUser.email.replace('@dabacenter.ir', '')),
confname: new FormControl('')
});
} else if (this.data.action === 'join') {
this.form = this._fb.group({
confAddress: new FormControl('')
});
}
this.form = this._fb.group({
username: new FormControl(this.loggedInUser.email.replace('@dabacenter.ir', '')),
confname: new FormControl('')
});
}

createRoom() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,17 @@
<div class="content-container full-width full-height display-flex flex-center">
<div *ngIf="!showConference" class="width-200">
<button mat-raised-button (click)="addNewVideoConf()"
class="blue-gradient margin-b-full full-width padding-mini-r-l text-white line-height-30 font-9-em overflow-hide text-weight-normal">
<mat-icon class="width-20 height-20 font-full-plus-two-tenth-rem">add</mat-icon>
class="blue-gradient full-width padding-mini-r-l text-white line-height-30 font-9-em overflow-hide text-weight-normal">
<span class="padding-mini-r-l">{{'conference.add' | translate}}</span>
</button>

<button mat-raised-button (click)="joinToExistConf()"
class="purple-gradient full-width padding-mini-r-l text-white line-height-30 font-9-em overflow-hide text-weight-normal">
<mat-icon class="width-20 height-20 font-full-plus-two-tenth-rem">group_add</mat-icon>
<span class="padding-mini-r-l">{{'conference.join' | translate}}</span>
</button>
</div>

<webview enableremotemodule="false" [ngClass]="{'showFrame': !showConference}" partition="persist:localstorage" #webFrame
<webview enableremotemodule="false" [ngClass]="{'showFrame': !showConference}" partition="persist:sessionstorage" #webFrame
class="webView-frame full-width full-height"></webview>
</div>

<div *ngIf="showConference" [dir]="rtlDirection ? 'rtl' : 'ltr'" class="copy-clipboard-container pos-abs bottom-half">
<button mat-raised-button (click)="exitOfConference()" [cdkCopyToClipboard]="confAddress"
<button mat-raised-button (click)="exitOfConference()"
class="red-gradient mat-elevation-z1 padding-mini-r-l margin-mini-r-l text-white line-height-20 font-7-em overflow-hide text-weight-normal">
<mat-icon class="width-18 height-18 line-height-18 font-8-rem">close</mat-icon>
<span class="padding-mini-r-l">{{'conference.exist_from_conf' | translate}}</span>
Expand All @@ -39,21 +32,21 @@
width="24px" height="30px" viewBox="0 0 24 30" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<rect x="0" y="13" width="4" height="5" fill="#333">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
</rect>
<rect x="10" y="13" width="4" height="5" fill="#333">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
</rect>
<rect x="20" y="13" width="4" height="5" fill="#333">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
</rect>
</svg>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Component, ElementRef, OnDestroy, ViewChild} from '@angular/core';
import {MatDialog} from '@angular/material/dialog';
import {AppConfig} from '../../../../environments/environment';
import {Subscription} from 'rxjs/internal/Subscription';
import {MessageService} from '../../../services/message.service';
import {TranslateService} from '@ngx-translate/core';
Expand Down Expand Up @@ -50,55 +51,25 @@ export class ConferenceMainComponent implements OnDestroy {
if (resp) {
this.loadingIndicatorService.changeLoadingStatus({status: true, serviceName: 'project'});

this.confAddress = `https://conference.dabacenter.ir/main.php?username=${resp.username}&confname=${resp.confname}`;
this.confAddress = resp.confname;

this.webFrame.nativeElement.setAttribute('src', this.confAddress);
const address = `${AppConfig.CONF_URL}?username=${resp.username}&confname=${resp.confname}`;

this.webFrame.nativeElement.addEventListener('did-start-loading', () => {
// console.log('did-start-loading');
});
if (this.webFrame) {
this.webFrame.nativeElement.setAttribute('src', address);

this.webFrame.nativeElement.addEventListener('did-stop-loading', () => {
this.loadingIndicatorService.changeLoadingStatus({status: false, serviceName: 'project'});
});
this.webFrame.nativeElement.addEventListener('did-start-loading', () => {
// console.log('did-start-loading');
});

setTimeout(() => {
this.showConference = true;
});
}
})
);
}

joinToExistConf() {
const dialogRef = this.dialog.open(ConferenceAddComponent, {
autoFocus: false,
width: '350px',
height: '205px',
data: {action: 'join'}
});

this._subscription.add(
dialogRef.afterClosed().subscribe((resp: ConferenceInterface) => {
if (resp) {
this.loadingIndicatorService.changeLoadingStatus({status: true, serviceName: 'project'});

this.confAddress = resp.confAddress;

this.webFrame.nativeElement.setAttribute('src', this.confAddress);

this.webFrame.nativeElement.addEventListener('did-start-loading', () => {
// console.log('did-start-loading');
});

this.webFrame.nativeElement.addEventListener('did-stop-loading', () => {
// console.log('did-stop-loading');
this.loadingIndicatorService.changeLoadingStatus({status: false, serviceName: 'project'});
});
this.webFrame.nativeElement.addEventListener('did-stop-loading', () => {
this.loadingIndicatorService.changeLoadingStatus({status: false, serviceName: 'project'});
});

setTimeout(() => {
this.showConference = true;
});
setTimeout(() => {
this.showConference = true;
});
}
}
})
);
Expand All @@ -111,6 +82,7 @@ export class ConferenceMainComponent implements OnDestroy {

exitOfConference() {
this.webFrame.nativeElement.setAttribute('src', '');
this.webFrame.nativeElement.stop();

this.showConference = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ export class MainMenuComponent {

constructor(private windowManagerService: WindowManagerService) {
setTimeout(() => {
/*const pbx = this.serviceList[0];
this.openService(pbx);
const project = this.serviceList[1];
this.openService(project);*/

this.loggedInUser.services.map(userService => {
const serviceName = userService.name.replace(' ', '_').toLowerCase();

Expand All @@ -41,10 +35,6 @@ export class MainMenuComponent {
}

openService(service: ServiceItemsInterface) {
/*if (!service.status) {
return;
}*/

this.windowManagerService.openWindowState(service);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
width="24px" height="30px" viewBox="0 0 24 30" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<rect x="0" y="13" width="4" height="5" fill="#333">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
</rect>
<rect x="10" y="13" width="4" height="5" fill="#333">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
</rect>
<rect x="20" y="13" width="4" height="5" fill="#333">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s"
repeatCount="indefinite"/>
repeatCount="indefinite"></animate>
</rect>
</svg>
</div>
Expand Down
Loading

0 comments on commit c9c1f78

Please sign in to comment.