mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-16 01:31:28 +03:00
linted files
This commit is contained in:
@@ -11,11 +11,11 @@ import {EventEmitter} from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class FileCardComponent implements OnInit {
|
export class FileCardComponent implements OnInit {
|
||||||
|
|
||||||
@Input() title:string;
|
@Input() title: string;
|
||||||
@Input() length:string;
|
@Input() length: string;
|
||||||
@Input() name:string;
|
@Input() name: string;
|
||||||
@Input() thumbnailURL: string;
|
@Input() thumbnailURL: string;
|
||||||
@Input() isAudio: boolean = true;
|
@Input() isAudio = true;
|
||||||
@Output() removeFile: EventEmitter<string> = new EventEmitter<string>();
|
@Output() removeFile: EventEmitter<string> = new EventEmitter<string>();
|
||||||
|
|
||||||
constructor(private postsService: PostsService, public snackBar: MatSnackBar, public appComponent: AppComponent) { }
|
constructor(private postsService: PostsService, public snackBar: MatSnackBar, public appComponent: AppComponent) { }
|
||||||
@@ -23,17 +23,13 @@ export class FileCardComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteFile()
|
deleteFile() {
|
||||||
{
|
|
||||||
this.postsService.deleteFile(this.name, this.isAudio).subscribe(result => {
|
this.postsService.deleteFile(this.name, this.isAudio).subscribe(result => {
|
||||||
if (result == true)
|
if (result === true) {
|
||||||
{
|
this.openSnackBar('Delete success!', 'OK.');
|
||||||
this.openSnackBar("Delete success!", "OK.");
|
|
||||||
this.removeFile.emit(this.name);
|
this.removeFile.emit(this.name);
|
||||||
}
|
} else {
|
||||||
else
|
this.openSnackBar('Delete failed!', 'OK.');
|
||||||
{
|
|
||||||
this.openSnackBar("Delete failed!", "OK.");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user