mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
- Updated confirmation dialog messages to provide detailed consequences of deleting playlists. - Added backup hints and progress messages for better user experience during playlist deletion. - Ensured consistency in language across all supported translations (de, el, en, es, fr, it, ja, ko, nl, pl, pt, ru, tr, zh, zhtw). Entire-Checkpoint: c6e522b4276c
69 lines
2.1 KiB
TypeScript
69 lines
2.1 KiB
TypeScript
import { CommonModule } from '@angular/common';
|
|
import { Component, computed, inject } from '@angular/core';
|
|
import { MatButtonModule } from '@angular/material/button';
|
|
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
import { MatIconModule } from '@angular/material/icon';
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
|
|
export interface SettingsDeleteAllPlaylistsDialogData {
|
|
summary: {
|
|
total: number;
|
|
m3u: number;
|
|
xtream: number;
|
|
stalker: number;
|
|
};
|
|
}
|
|
|
|
type SettingsDeleteSummaryItem = {
|
|
count: number;
|
|
icon: string;
|
|
id: 'm3u' | 'xtream' | 'stalker';
|
|
labelKey: string;
|
|
};
|
|
|
|
@Component({
|
|
selector: 'app-settings-delete-all-playlists-dialog',
|
|
templateUrl: './settings-delete-all-playlists-dialog.component.html',
|
|
styleUrls: ['./settings-delete-all-playlists-dialog.component.scss'],
|
|
imports: [
|
|
CommonModule,
|
|
MatButtonModule,
|
|
MatDialogModule,
|
|
MatIconModule,
|
|
TranslateModule,
|
|
],
|
|
})
|
|
export class SettingsDeleteAllPlaylistsDialogComponent {
|
|
readonly dialogData =
|
|
inject<SettingsDeleteAllPlaylistsDialogData>(MAT_DIALOG_DATA);
|
|
|
|
readonly summaryItems = computed<SettingsDeleteSummaryItem[]>(() => [
|
|
{
|
|
id: 'm3u',
|
|
count: this.dialogData.summary.m3u,
|
|
icon: 'playlist_play',
|
|
labelKey: 'HOME.PLAYLIST_TYPES.M3U',
|
|
},
|
|
{
|
|
id: 'xtream',
|
|
count: this.dialogData.summary.xtream,
|
|
icon: 'cloud',
|
|
labelKey: 'HOME.PLAYLIST_TYPES.XTREAM',
|
|
},
|
|
{
|
|
id: 'stalker',
|
|
count: this.dialogData.summary.stalker,
|
|
icon: 'router',
|
|
labelKey: 'HOME.PLAYLIST_TYPES.STALKER',
|
|
},
|
|
]);
|
|
|
|
readonly consequenceKeys = [
|
|
'SETTINGS.REMOVE_DIALOG.CONSEQUENCE_FAVORITES',
|
|
'SETTINGS.REMOVE_DIALOG.CONSEQUENCE_RECENTLY_VIEWED',
|
|
'SETTINGS.REMOVE_DIALOG.CONSEQUENCE_PLAYBACK',
|
|
'SETTINGS.REMOVE_DIALOG.CONSEQUENCE_DOWNLOADS',
|
|
'SETTINGS.REMOVE_DIALOG.CONSEQUENCE_XTREAM_CACHE',
|
|
] as const;
|
|
}
|