From cbdfbeb3ce5b5662021a5867029791b0fae12635 Mon Sep 17 00:00:00 2001 From: 4gray Date: Tue, 2 Apr 2024 22:01:37 +0200 Subject: [PATCH] refactor(portals): simplify external player info dialog --- .../external-player-info-dialog.component.ts | 48 +++++++++++++++++-- .../player-view/player-view.component.html | 20 -------- .../player-view/player-view.component.ts | 30 ------------ 3 files changed, 44 insertions(+), 54 deletions(-) delete mode 100644 src/app/xtream/player-view/player-view.component.html delete mode 100644 src/app/xtream/player-view/player-view.component.ts diff --git a/src/app/shared/components/external-player-info-dialog/external-player-info-dialog.component.ts b/src/app/shared/components/external-player-info-dialog/external-player-info-dialog.component.ts index b8b63db5f..a62c956a7 100644 --- a/src/app/shared/components/external-player-info-dialog/external-player-info-dialog.component.ts +++ b/src/app/shared/components/external-player-info-dialog/external-player-info-dialog.component.ts @@ -1,15 +1,35 @@ import { Component } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; +import { MatIconModule } from '@angular/material/icon'; +import { RouterLink } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; -import { PlayerViewComponent } from '../../../xtream/player-view/player-view.component'; @Component({ standalone: true, template: `

{{ 'INFORMATION' | translate }}

- +
+ live_tv +
+ The video is playing in external player window.
+ Please make sure that mpv/vlc player is correctly installed + on your system.
+ See + installation instructions + for more details. +
+
`, + styles: [ + ` + .centered { + text-align: center; + line-height: 24px; + margin: 20px; + + .icon { + font-size: 64px; + height: 64px; + width: 64px; + } + } + `, + ], imports: [ MatButtonModule, MatDialogModule, - PlayerViewComponent, + MatIconModule, + RouterLink, TranslateModule, ], }) -export class ExternalPlayerInfoDialogComponent {} +export class ExternalPlayerInfoDialogComponent { + openUrl(url: string) { + window.open(url, '_blank'); + } +} diff --git a/src/app/xtream/player-view/player-view.component.html b/src/app/xtream/player-view/player-view.component.html deleted file mode 100644 index 0e927b7f4..000000000 --- a/src/app/xtream/player-view/player-view.component.html +++ /dev/null @@ -1,20 +0,0 @@ -
- live_tv -
- The video is playing in external player window.
- Please make sure that mpv player is correctly installed on your - system.
- See - installation instructions - for more details. -
-
diff --git a/src/app/xtream/player-view/player-view.component.ts b/src/app/xtream/player-view/player-view.component.ts deleted file mode 100644 index 0fce1e532..000000000 --- a/src/app/xtream/player-view/player-view.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component } from '@angular/core'; -import { MatIconModule } from '@angular/material/icon'; -import { RouterLink } from '@angular/router'; - -@Component({ - selector: 'app-player-view', - templateUrl: './player-view.component.html', - standalone: true, - imports: [MatIconModule, RouterLink], - styles: [ - ` - .centered { - text-align: center; - line-height: 24px; - margin: 20px; - - .icon { - font-size: 64px; - height: 64px; - width: 64px; - } - } - `, - ], -}) -export class PlayerViewComponent { - openUrl(url: string) { - window.open(url, '_blank'); - } -}