mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 10:06:15 -08:00
fix(ui): destructive confirmations, verb labels and provider icons
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>
This commit is contained in:
1 parent
572034f3be
commit
082c56608b
50 files changed
+584
-103
No files matched your search
+4
-3
@@ -8,6 +8,7 @@ import {
|
||||
WorkspacePortalContext,
|
||||
WorkspaceShellRoute,
|
||||
} from '@iptvnator/workspace/shell/util';
|
||||
import { SOURCE_TYPE_ICONS } from '@iptvnator/shared/interfaces';
|
||||
import { TranslateFn } from './workspace-shell-search-labels';
|
||||
|
||||
export interface CommandBuilderActions {
|
||||
@@ -275,7 +276,7 @@ export function getGlobalCommandDefinitions(
|
||||
{
|
||||
id: 'add-playlist-m3u',
|
||||
group: 'global',
|
||||
icon: 'folder_open',
|
||||
icon: SOURCE_TYPE_ICONS.m3u,
|
||||
labelKey: 'WORKSPACE.SHELL.COMMANDS.ADD_PLAYLIST_M3U_LABEL',
|
||||
descriptionKey:
|
||||
'WORKSPACE.SHELL.COMMANDS.ADD_PLAYLIST_M3U_DESCRIPTION',
|
||||
@@ -286,7 +287,7 @@ export function getGlobalCommandDefinitions(
|
||||
{
|
||||
id: 'add-playlist-xtream',
|
||||
group: 'global',
|
||||
icon: 'cloud',
|
||||
icon: SOURCE_TYPE_ICONS.xtream,
|
||||
labelKey: 'WORKSPACE.SHELL.COMMANDS.ADD_PLAYLIST_XTREAM_LABEL',
|
||||
descriptionKey:
|
||||
'WORKSPACE.SHELL.COMMANDS.ADD_PLAYLIST_XTREAM_DESCRIPTION',
|
||||
@@ -297,7 +298,7 @@ export function getGlobalCommandDefinitions(
|
||||
{
|
||||
id: 'add-playlist-stalker',
|
||||
group: 'global',
|
||||
icon: 'cast',
|
||||
icon: SOURCE_TYPE_ICONS.stalker,
|
||||
labelKey: 'WORKSPACE.SHELL.COMMANDS.ADD_PLAYLIST_STALKER_LABEL',
|
||||
descriptionKey:
|
||||
'WORKSPACE.SHELL.COMMANDS.ADD_PLAYLIST_STALKER_DESCRIPTION',
|
||||
|
||||
+4
-3
@@ -14,6 +14,7 @@ import {
|
||||
} from '@iptvnator/m3u-state';
|
||||
import { TranslatePipe } from '@ngx-translate/core';
|
||||
import { WorkspaceShellContextDrawerService } from '@iptvnator/workspace/shell/util';
|
||||
import { SOURCE_TYPE_ICONS } from '@iptvnator/shared/interfaces';
|
||||
|
||||
type PlaylistFilterId = 'all' | 'm3u' | 'xtream' | 'stalker';
|
||||
|
||||
@@ -55,17 +56,17 @@ export class WorkspaceSourcesFiltersPanelComponent {
|
||||
},
|
||||
{
|
||||
id: 'm3u',
|
||||
icon: 'playlist_play',
|
||||
icon: SOURCE_TYPE_ICONS.m3u,
|
||||
translationKey: 'HOME.PLAYLIST_TYPES.M3U',
|
||||
},
|
||||
{
|
||||
id: 'xtream',
|
||||
icon: 'cloud',
|
||||
icon: SOURCE_TYPE_ICONS.xtream,
|
||||
translationKey: 'HOME.PLAYLIST_TYPES.XTREAM',
|
||||
},
|
||||
{
|
||||
id: 'stalker',
|
||||
icon: 'router',
|
||||
icon: SOURCE_TYPE_ICONS.stalker,
|
||||
translationKey: 'HOME.PLAYLIST_TYPES.STALKER',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user