mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor: remove unused back navigation and clean up downloads component
This commit is contained in:
1 parent
2f1e455330
commit
9a04c42e79
2 files changed
+9
-11
No files matched your search
@@ -1,9 +1,6 @@
|
||||
<div class="downloads">
|
||||
<header class="downloads__header">
|
||||
<div class="downloads__header-left">
|
||||
<button mat-icon-button (click)="goBack()" class="back-btn">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
</button>
|
||||
<h1>{{ 'DOWNLOADS.TITLE' | translate }}</h1>
|
||||
@if (activeCount() > 0) {
|
||||
<span class="downloads__badge">{{ activeCount() }}</span>
|
||||
@@ -25,7 +22,9 @@
|
||||
|
||||
<div class="downloads__folder">
|
||||
<mat-icon>folder</mat-icon>
|
||||
<span class="downloads__folder-path">{{ downloadFolder() || ('DOWNLOADS.NO_FOLDER' | translate) }}</span>
|
||||
<span class="downloads__folder-path">{{
|
||||
downloadFolder() || ('DOWNLOADS.NO_FOLDER' | translate)
|
||||
}}</span>
|
||||
<button mat-stroked-button (click)="changeFolder()">
|
||||
{{ 'DOWNLOADS.CHANGE_FOLDER' | translate }}
|
||||
</button>
|
||||
@@ -81,7 +80,11 @@
|
||||
<mat-icon>{{
|
||||
getStatusIcon(item.status)
|
||||
}}</mat-icon>
|
||||
{{ 'DOWNLOADS.STATUS.' + item.status.toUpperCase() | translate }}
|
||||
{{
|
||||
'DOWNLOADS.STATUS.' +
|
||||
item.status.toUpperCase()
|
||||
| translate
|
||||
}}
|
||||
</span>
|
||||
|
||||
@if (
|
||||
|
||||
@@ -9,7 +9,7 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { TranslatePipe } from '@ngx-translate/core';
|
||||
import {
|
||||
DownloadItem,
|
||||
@@ -31,7 +31,6 @@ import {
|
||||
})
|
||||
export class DownloadsComponent implements OnInit {
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
private readonly router = inject(Router);
|
||||
readonly downloadsService = inject(DownloadsService);
|
||||
|
||||
readonly downloads = this.downloadsService.downloads;
|
||||
@@ -135,10 +134,6 @@ export class DownloadsComponent implements OnInit {
|
||||
await this.downloadsService.clearCompleted(playlistId);
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['..'], { relativeTo: this.route });
|
||||
}
|
||||
|
||||
formatEpisodeLabel(item: DownloadItem): string {
|
||||
if (item.contentType !== 'episode') return '';
|
||||
const s = item.seasonNumber?.toString().padStart(2, '0') || '00';
|
||||
|
||||
Reference in new issue
Block a user