mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor(player): remove unused PlayerDialog and SafePipe
Remove the PlayerDialogComponent (TS, HTML, SCSS) and the standalone SafePipe from the xtream feature. These files were deleted because the dialog and pipe are no longer used by the application, reducing dead code and simplifying the web module surface. This change prevents maintaining UI code (player markup, styles, and clipboard/snackbar logic) and an unused DOM sanitizer pipe, improving project maintainability and build size.
This commit is contained in:
1 parent
34b252831b
commit
3c4af147a8
4 files changed
-112
No files matched your search
@@ -1,25 +0,0 @@
|
||||
<h2 mat-dialog-title>{{ title }}</h2>
|
||||
<mat-dialog-content class="content">
|
||||
<app-web-player-view [streamUrl]="streamUrl" />
|
||||
<mat-form-field class="link-input">
|
||||
<input
|
||||
matInput
|
||||
formControlName="streamUrl"
|
||||
[value]="streamUrl"
|
||||
disabled
|
||||
/>
|
||||
</mat-form-field>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions class="align-actions">
|
||||
<button
|
||||
mat-button
|
||||
[cdkCopyToClipboard]="streamUrl"
|
||||
(click)="showCopyNotification()"
|
||||
>
|
||||
<mat-icon>content_copy</mat-icon>
|
||||
{{ 'PORTALS.COPY_STREAM_URL' | translate }}
|
||||
</button>
|
||||
<button mat-button mat-dialog-close color="accent">
|
||||
{{ 'CLOSE' | translate }}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
@@ -1,22 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
.content {
|
||||
overflow: hidden;
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.link-input {
|
||||
width: 98%;
|
||||
padding-top: 5px;
|
||||
@include mat.form-field-density(-5);
|
||||
}
|
||||
|
||||
.align-actions {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
mat-dialog-content {
|
||||
.video-js {
|
||||
height: 500px !important;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
import { ClipboardModule } from '@angular/cdk/clipboard';
|
||||
import { Component, inject, ViewEncapsulation } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { WebPlayerViewComponent } from 'shared-portals';
|
||||
|
||||
export interface PlayerDialogData {
|
||||
streamUrl: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
templateUrl: './player-dialog.component.html',
|
||||
imports: [
|
||||
ClipboardModule,
|
||||
MatButtonModule,
|
||||
MatDialogModule,
|
||||
MatFormFieldModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
TranslateModule,
|
||||
WebPlayerViewComponent,
|
||||
],
|
||||
styleUrl: './player-dialog.component.scss',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class PlayerDialogComponent {
|
||||
readonly data = inject(MAT_DIALOG_DATA) as PlayerDialogData;
|
||||
private snackBar = inject(MatSnackBar);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
readonly title: string;
|
||||
readonly streamUrl: string;
|
||||
|
||||
constructor() {
|
||||
this.streamUrl = this.data.streamUrl;
|
||||
this.title = this.data.title;
|
||||
}
|
||||
|
||||
showCopyNotification() {
|
||||
this.snackBar.open(
|
||||
this.translateService.instant('PORTALS.STREAM_URL_COPIED'),
|
||||
null,
|
||||
{
|
||||
duration: 2000,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Pipe({ name: 'safe', standalone: true })
|
||||
export class SafePipe implements PipeTransform {
|
||||
constructor(private sanitizer: DomSanitizer) {}
|
||||
|
||||
transform(url: string) {
|
||||
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user