Skip to content

Commit

Permalink
openvidu-components: Displayed dialog on PRO features
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Nov 16, 2022
1 parent 14debd5 commit 41e9cc9
Show file tree
Hide file tree
Showing 23 changed files with 150 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DialogData } from '../../models/dialog.model';

/**
* @internal
*/
export interface DialogData {
title: string;
description: string;
showActionButtons: boolean;
}
/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DialogData } from '../../models/dialog.model';


/**
* @internal
*/

@Component({
selector: 'ov-pro-feature-template',
template: `
<h1 mat-dialog-title>{{ data.title }}</h1>
<div mat-dialog-content>{{ data.description }}</div>
<div mat-dialog-actions *ngIf="data.showActionButtons">
<button mat-button (click)="seeMore()">
<span>{{'PANEL.SEE_MORE' | translate}}</span>
<mat-icon>open_in_new</mat-icon>
</button>
<button mat-button (click)="close()">{{'PANEL.CLOSE' | translate}}</button>
</div>
`
})
export class ProFeatureDialogTemplateComponent {
constructor(public dialogRef: MatDialogRef<ProFeatureDialogTemplateComponent>, @Inject(MAT_DIALOG_DATA) public data: DialogData) {}

close() {
this.dialogRef.close();
}

seeMore() {
window.open('https://docs.openvidu.io/en/stable/openvidu-pro/', '_blank')?.focus();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { RecordingDialogData } from '../../models/dialog.model';

/**
* @internal
Expand All @@ -25,9 +26,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
})
export class RecordingDialogComponent {
src: string;
type: string;

constructor(public dialogRef: MatDialogRef<RecordingDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
constructor(public dialogRef: MatDialogRef<RecordingDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: RecordingDialogData) {
this.src = data.src;
}
close() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
color: var(--ov-text-color);
}

.pro-feature {
text-align: center;
}

.pro-feture p {
font-size: 14px;
}

::ng-deep .mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
background-color: var(--ov-tertiary-color);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<mat-list>
<mat-list *ngIf="isOpenViduPro">
<div>
<mat-list-item>
<div mat-line>{{ 'PANEL.SETTINGS.CAPTIONS' | translate }}</div>
Expand Down Expand Up @@ -28,4 +28,11 @@
<span class="section-description">{{ 'PANEL.SETTINGS.CAPTIONS_LANG_TEXT' | translate }}</span>
</div>
</mat-list>

<div *ngIf="!isOpenViduPro" class="pro-feature">
<img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAEOCAMAAABPbwmXAAAC/VBMVEUAAADr6+s1Nzzo6Ojr1dHr7Ozq5eTr6+vq6+vo6OhAOkDo6Ojr6+vr6+vr6+vs7Ozs7Ozr6+vr7OzETk7q6urr6+vs7Ozr6+zr6+vs7OzCTEzs7Ozr6+vr6+vWbWXr6+vq6ur8+vslMTcvP0br7Ozq6urs7Ozs7Ozt7e3r6+vs7Ozs7OwsOUDr6+vr6+vs7OzCTEzs7Ozs7OzSUlLs7Ozr6+vr6+vs6+s1PkU3R0/t7e3s7Ozs7OyztLXYVFTs7OwzQkkyP0bhdW8zQkrggXM4SVHs7OyXTlHt7u4yP0bKT0/mkX/wu7jLhHU3R083R08zQ0vrlIE4SFHc3Nzb29vIUFA1REzJYF/slIE1RU3rlIHDTU3IT084Rk1IUFSum5c3R0/d3t7rk4DMVlY2Q0uDTVHb29s3R0/CTEzWVlXXWVjX2Njjy8vrlIHslYLmk4PokH7KzM3slIG+w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It1aYDOxtYqOLjd1aBd8UWRKEV7m0y6LN0v9SqVEUUyCvxGSpvGxDBZ8F6hDgrtTkVWKSEmrTwwf/7N37zoKAlEYgMfMoBAuzhARDBIouAhEDIZLgiS0Psw+E80mJttsYrVPsY+yic0W2+1UdtKgKMl85VRz/vzFqWbePgesx+lMn2XooKxBPxFpu7xfv9q65XfYNf2n8zokAv3AmrS9fP2dBnT+bjuQGoK+tLRfIJePIV3am0iqgTuAkaeSduSI6kUQ3IkQzdMd3cJGabLdpfNIAPclRjjXY8K1I8KRWM9xJILHQLwc1nt9F0gv3pSJFOz0fR3KPAKPhkRLMwozU5PAfbGycG6QqJlZGJolIjAoOOUtJ8SFmepNUhGJe1JjJpxEqqTRU7PAoWPxUwieCwm8JWsh9j1ztTk2sRIQ94Hp0PldEihxc9ysTM/HoSZbvIDAK4JIEGk4jr0wsF94+X6VbXS1OcSJUgVLsnVdSeKoCXVjWoqjJMl1t2QZVEoSHxpV32Srfe4VPjYWtkMDEAUEwQhBNBVoRrOZtZZlx9FsexGWpWFgjOeUfzWn6KFhlGW4sG3NcWR5bc1mdHJhOs7ZGYZhGIZhGIZhGIZh/tuDAxIAAAAAQf9ftyNQAQAAAAAAAAAAAABgKnFticyleiBsAAAAAElFTkSuQmCC"
/>
<p [innerHTML]="'PANEL.PRO_FEATURE' | translate"></p>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { Subscription } from 'rxjs';
import { CaptionService } from '../../../services/caption/caption.service';
import { LayoutService } from '../../../services/layout/layout.service';
import { OpenViduService } from '../../../services/openvidu/openvidu.service';

/**
* @internal
Expand All @@ -16,13 +17,17 @@ export class CaptionsSettingComponent implements OnInit, OnDestroy {
languagesAvailable: { name: string; ISO: string }[] = [];
captionsSubscription: Subscription;
langSelected: string;
isOpenViduPro: boolean = false;

constructor(private layoutService: LayoutService, private captionService: CaptionService) {}
constructor(private layoutService: LayoutService, private captionService: CaptionService, private openviduService: OpenViduService) {}

ngOnInit(): void {
this.subscribeToCaptions();
this.langSelected = this.captionService.getLangSelected().name;
this.languagesAvailable = this.captionService.getCaptionLanguages();
this.isOpenViduPro = this.openviduService.isOpenViduPro();
if (this.isOpenViduPro) {
this.subscribeToCaptions();
this.langSelected = this.captionService.getLangSelected().name;
this.languagesAvailable = this.captionService.getCaptionLanguages();
}
}

ngOnDestroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,28 @@ export class ToolbarComponent implements OnInit, OnDestroy, AfterViewInit {
* @ignore
*/
toggleBackgroundEffects() {
this.panelService.togglePanel(PanelType.BACKGROUND_EFFECTS);
if (this.openviduService.isOpenViduPro()) {
this.panelService.togglePanel(PanelType.BACKGROUND_EFFECTS);
} else {
this.actionService.openProFeatureDialog(
this.translateService.translate('PANEL.BACKGROUND.TITLE'),
this.translateService.translate('PANEL.PRO_FEATURE')
);
}
}

/**
* @ignore
*/
toggleCaptions() {
this.layoutService.toggleCaptions();
if (this.openviduService.isOpenViduPro()) {
this.layoutService.toggleCaptions();
} else {
this.actionService.openProFeatureDialog(
this.translateService.translate('PANEL.SETTINGS.CAPTIONS'),
this.translateService.translate('PANEL.PRO_FEATURE')
);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ export class VideoconferenceComponent implements OnInit, OnDestroy, AfterViewIni
this.openviduService.setOpenViduEdition(OpenViduEdition.PRO);
} else {
this.openviduService.setOpenViduEdition(OpenViduEdition.CE);
this.libService.backgroundEffectsButton.next(false);
this.libService.captionsButton.next(false);
}

if (tokens.screen) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "关闭",
"SEE_MORE": "查看更多",
"PRO_FEATURE": "此功能属于OpenVidu PRO级别",
"CHAT": {
"TITLE": "聊天",
"YOU": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Schließen",
"SEE_MORE": "Mehr sehen",
"PRO_FEATURE": "Diese Funktion ist Teil des OpenVidu PRO-Tiers",
"CHAT": {
"TITLE": "Chat",
"YOU": "Sie",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Close",
"SEE_MORE": "See more",
"PRO_FEATURE": "This feature is part of OpenVidu PRO tier",
"CHAT": {
"TITLE": "Chat",
"YOU": "You",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Cerrar",
"SEE_MORE": "Ver más",
"PRO_FEATURE": "Esta funcionalidad es parte de OpenVidu PRO",
"CHAT": {
"TITLE": "Chat",
"YOU": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Fermer",
"SEE_MORE": "Voir plus",
"PRO_FEATURE": "Cette fonctionnalité fait partie de la gamme OpenVidu PRO",
"CHAT": {
"TITLE": "Chat",
"YOU": "Vous",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "बंद करें",
"SEE_MORE": "और देखें",
"PRO_FEATURE": "यह सुविधा OpenVidu PRO टायर का हिस्सा है",
"CHAT": {
"TITLE": "बातचीत",
"YOU": "आप",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Chiudi",
"SEE_MORE": "Vedi di più",
"PRO_FEATURE": "Questa funzione fa parte del livello OpenVidu PRO",
"CHAT": {
"TITLE": "Chat",
"YOU": "Tu",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "閉じる",
"PRO_FEATURE": "この機能はOpenVidu PROの機能です",
"SEE_MORE": "もっと見る",
"CHAT": {
"TITLE": "チャット",
"YOU": "あなた",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Sluiten",
"SEE_MORE": "Zie meer",
"PRO_FEATURE": "Deze functie is onderdeel van OpenVidu PRO tier",
"CHAT": {
"TITLE": "Chat",
"YOU": "Jij",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
},
"PANEL": {
"CLOSE": "Fechar",
"SEE_MORE": "Ver mais",
"PRO_FEATURE": "Esta funcionalidade é parte do OpenVidu PRO tier",
"CHAT": {
"TITLE": "Chat",
"YOU": "Você",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @internal
*/
export interface DialogData {
title: string;
description: string;
showActionButtons: boolean;
}

/**
* @internal
*/
export interface RecordingDialogData {
src: string;
showActionButtons: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { AdminDashboardComponent } from './admin/dashboard/dashboard.component';
import { AdminLoginComponent } from './admin/login/login.component';
import { AvatarProfileComponent } from './components/avatar-profile/avatar-profile.component';
import { CaptionsComponent } from './components/captions/captions.component';
import { ProFeatureDialogTemplateComponent } from './components/dialogs/pro-feature-dialog.component';
import { ActivitiesPanelComponent } from './components/panel/activities-panel/activities-panel.component';
import { RecordingActivityComponent } from './components/panel/activities-panel/recording-activity-panel/recording-activity.component';
import { BackgroundEffectsPanelComponent } from './components/panel/background-effects-panel/background-effects-panel.component';
Expand Down Expand Up @@ -82,6 +83,7 @@ const privateComponents = [
AudioWaveComponent,
CaptionsComponent,
DialogTemplateComponent,
ProFeatureDialogTemplateComponent,
RecordingDialogComponent,
DeleteDialogComponent,
AvatarProfileComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export class TranslatePipe implements PipeTransform {
constructor(private translateService: TranslateService) {}

transform(str: string): string {
return this.translateService.translate(str);

const translation = this.translateService.translate(str);
return translation.replace('OpenVidu PRO', '<a href="https://docs.openvidu.io/en/stable/openvidu-pro/" target="_blank">OpenVidu PRO</a>');
}
}
Loading

0 comments on commit 41e9cc9

Please sign in to comment.