diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.css b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.css index a4931746..41884e48 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.css +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.css @@ -8,6 +8,9 @@ border-right: 1px solid var(--ov-secondary-color); width: 170px; } +.item-menu.mobile { + width: 50px !important; +} .item-content { padding: 16px; diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.html index 65dcd05f..770fa615 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.html @@ -7,19 +7,38 @@
-
- - +
+ + manage_accounts -
{{ 'PANEL.SETTINGS.GENERAL' | translate }}
+
{{ 'PANEL.SETTINGS.GENERAL' | translate }}
- + videocam -
{{ 'PANEL.SETTINGS.VIDEO' | translate }}
+
{{ 'PANEL.SETTINGS.VIDEO' | translate }}
- + mic -
{{ 'PANEL.SETTINGS.AUDIO' | translate }}
+
{{ 'PANEL.SETTINGS.AUDIO' | translate }}
closed_caption -
{{ 'PANEL.SETTINGS.CAPTIONS' | translate }}
+
{{ 'PANEL.SETTINGS.CAPTIONS' | translate }}
diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts index 183cc9c8..45666a42 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts @@ -3,6 +3,7 @@ import { Subscription } from 'rxjs'; import { PanelSettingsOptions, PanelType } from '../../../models/panel.model'; import { OpenViduAngularConfigService } from '../../../services/config/openvidu-angular.config.service'; import { PanelEvent, PanelService } from '../../../services/panel/panel.service'; +import { PlatformService } from '../../../services/platform/platform.service'; /** * @internal @@ -16,10 +17,16 @@ export class SettingsPanelComponent implements OnInit { settingsOptions: typeof PanelSettingsOptions = PanelSettingsOptions; selectedOption: PanelSettingsOptions = PanelSettingsOptions.GENERAL; showCaptions: boolean = true; - private captionsSubs: Subscription; panelSubscription: Subscription; - constructor(private panelService: PanelService, private libService: OpenViduAngularConfigService) {} + isMobile: boolean = false; + private captionsSubs: Subscription; + constructor( + private panelService: PanelService, + private platformService: PlatformService, + private libService: OpenViduAngularConfigService + ) {} ngOnInit() { + this.isMobile = this.platformService.isMobile(); this.subscribeToPanelToggling(); this.subscribeToDirectives(); } @@ -31,9 +38,9 @@ export class SettingsPanelComponent implements OnInit { close() { this.panelService.togglePanel(PanelType.SETTINGS); } - onSelectionChanged(option: PanelSettingsOptions){ + onSelectionChanged(option: PanelSettingsOptions) { this.selectedOption = option; - } + } private subscribeToDirectives() { this.captionsSubs = this.libService.captionsButtonObs.subscribe((value: boolean) => { @@ -42,12 +49,10 @@ export class SettingsPanelComponent implements OnInit { } private subscribeToPanelToggling() { - this.panelSubscription = this.panelService.panelOpenedObs.subscribe( - (ev: PanelEvent) => { - if (ev.type === PanelType.SETTINGS && !!ev.expand) { - this.selectedOption = ev.expand as PanelSettingsOptions; - } + this.panelSubscription = this.panelService.panelOpenedObs.subscribe((ev: PanelEvent) => { + if (ev.type === PanelType.SETTINGS && !!ev.expand) { + this.selectedOption = ev.expand as PanelSettingsOptions; } - ); + }); } }