mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
Confirmations: ConfirmDialogData.confirmLabel is required, so no dialog can
fall back to "Yes"/"No"; the dismiss defaults to "Cancel" and
`tone: 'destructive'` styles the confirm with .app-destructive-button. Every
caller names its action ("Remove playlist", "Clear", "Refresh playlist",
"Cancel download" with a "Close" dismiss). The confirm button has the
confirm-dialog-confirm test id and drops its no-op color="primary".
The no-op `warn` color input becomes .app-destructive-button on the EPG
mapping, playlist item, error view, EPG/reset settings, delete-all and source
cleanup buttons, and on the unsaved-changes dialog's Discard.
Provider icons come from SOURCE_TYPE_ICONS in shared/interfaces (Xtream
cloud, Stalker cast, M3U playlist_play / link / description / subject) in the
add dialog, auto-import, empty state, playlist switcher, playlist rows,
dashboard source rail, command palette, Sources filters and both reset
summaries. Stalker no longer borrows the Dashboard icon, and Xtream no longer
shares a glyph with M3U URL playlists.
The playlist error view removed a playlist through the stale
PlaylistActions.removePlaylist: it dropped the playlist from state before the
delete ran, swallowed failures, skipped the source activity guard and showed
no toast. It now uses PlaylistDeleteActionService like every other removal,
commits only a completed delete, toasts and goes home. The unused action and
its effect are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import {
|
|
Component,
|
|
input,
|
|
output,
|
|
ViewEncapsulation,
|
|
ChangeDetectionStrategy,
|
|
} from '@angular/core';
|
|
import { MatButtonModule } from '@angular/material/button';
|
|
import { MatIconModule } from '@angular/material/icon';
|
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
import { SOURCE_TYPE_ICONS } from '@iptvnator/shared/interfaces';
|
|
import { SettingsPlaylistDeleteSummary } from './settings.models';
|
|
|
|
@Component({
|
|
selector: 'app-settings-reset-section',
|
|
imports: [
|
|
MatButtonModule,
|
|
MatIconModule,
|
|
MatProgressSpinnerModule,
|
|
TranslateModule,
|
|
],
|
|
templateUrl: './settings-reset-section.component.html',
|
|
encapsulation: ViewEncapsulation.None,
|
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection -- Preserve pre-Angular 22 eager checking during the framework upgrade.
|
|
changeDetection: ChangeDetectionStrategy.Eager,
|
|
styles: [':host { display: contents; }'],
|
|
})
|
|
export class SettingsResetSectionComponent {
|
|
readonly sourceIcons = SOURCE_TYPE_ICONS;
|
|
readonly isRemovingAllPlaylists = input(false);
|
|
readonly canRemoveAllPlaylists = input(false);
|
|
readonly playlistDeleteSummary =
|
|
input.required<SettingsPlaylistDeleteSummary>();
|
|
readonly removeAllProgressLabel = input<string | null>(null);
|
|
|
|
readonly removeAll = output<void>();
|
|
}
|