mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 11:06:16 -08:00
- Replaced the existing favorites component HTML structure with a new app-favorites-layout component for better organization and maintainability. - Removed unused styles from favorites.component.scss. - Updated favorites.component.ts to utilize the new layout component and streamline imports. - Enhanced detail-view styles for improved responsiveness and layout consistency. - Adjusted navigation component to conditionally render elements based on playlist type. - Introduced a new NavigationItem interface for better type safety in navigation items. - Refactored search results component to utilize new search-form and search-result-item components for cleaner code and separation of concerns. - Updated vod-details component to handle portal ID retrieval more robustly. - Made various style adjustments across components for improved UI consistency.
139 lines
3.8 KiB
TypeScript
139 lines
3.8 KiB
TypeScript
import { createAction, props } from '@ngrx/store';
|
|
import { Channel } from '../../../shared/channel.interface';
|
|
import { Playlist } from '../../../shared/playlist.interface';
|
|
import { EpgProgram } from '../player/models/epg-program.model';
|
|
import { PlaylistMeta } from '../shared/playlist-meta.type';
|
|
|
|
const STORE_KEY = '[GLOBAL STORE]';
|
|
const PLAYLISTS_STORE_KEY = '[PLAYLISTS STORE]';
|
|
|
|
export const loadPlaylists = createAction(
|
|
`${PLAYLISTS_STORE_KEY} Load playlists from db`
|
|
);
|
|
|
|
export const loadPlaylistsSuccess = createAction(
|
|
`${PLAYLISTS_STORE_KEY} Successfully loaded playlists from db`,
|
|
props<{ playlists: PlaylistMeta[] }>()
|
|
);
|
|
|
|
export const addPlaylist = createAction(
|
|
`${PLAYLISTS_STORE_KEY} Add new playlist`,
|
|
props<{ playlist: Playlist }>()
|
|
);
|
|
|
|
export const addManyPlaylists = createAction(
|
|
`${PLAYLISTS_STORE_KEY} Add many playlists`,
|
|
props<{ playlists: Playlist[] }>()
|
|
);
|
|
|
|
export const removePlaylist = createAction(
|
|
`${PLAYLISTS_STORE_KEY} Remove playlist by id`,
|
|
props<{ playlistId: string }>()
|
|
);
|
|
|
|
export const updatePlaylistMeta = createAction(
|
|
`${PLAYLISTS_STORE_KEY} update playlist meta`,
|
|
props<{ playlist: PlaylistMeta }>()
|
|
);
|
|
|
|
export const updatePlaylist = createAction(
|
|
`${PLAYLISTS_STORE_KEY} update playlist`,
|
|
props<{ playlist: Playlist; playlistId: string }>()
|
|
);
|
|
|
|
export const updateManyPlaylists = createAction(
|
|
`${PLAYLISTS_STORE_KEY} Update many playlists (auto-update mechanism)`,
|
|
props<{ playlists: Playlist[] }>()
|
|
);
|
|
|
|
export const parsePlaylist = createAction(
|
|
`${PLAYLISTS_STORE_KEY} parse playlist`,
|
|
props<{
|
|
uploadType: 'FILE' | 'URL' | 'TEXT';
|
|
playlist: string;
|
|
title: string;
|
|
path?: string;
|
|
}>()
|
|
);
|
|
|
|
export const setActivePlaylist = createAction(
|
|
`${PLAYLISTS_STORE_KEY} set active playlist`,
|
|
props<{ playlistId: string }>()
|
|
);
|
|
|
|
export const updateFavorites = createAction(
|
|
`${STORE_KEY} Add/remove provided channel to the favorites`,
|
|
props<{ channel: Channel }>()
|
|
);
|
|
|
|
export const setFavorites = createAction(
|
|
`${STORE_KEY} Set favorites`,
|
|
props<{ channelIds: string[] }>()
|
|
);
|
|
|
|
export const setActiveChannel = createAction(
|
|
`${STORE_KEY} Set active channel`,
|
|
props<{ channel: Channel }>()
|
|
);
|
|
|
|
export const resetActiveChannel = createAction(
|
|
`${STORE_KEY} Reset active channel`
|
|
);
|
|
|
|
export const setActiveChannelSuccess = createAction(
|
|
`${STORE_KEY} Set active channel success`,
|
|
props<{ channel: Channel }>()
|
|
);
|
|
|
|
export const setActiveEpgProgram = createAction(
|
|
`${STORE_KEY} Sets the given timestamp for the epg program`,
|
|
props<{ program: EpgProgram }>()
|
|
);
|
|
|
|
export const setCurrentEpgProgram = createAction(
|
|
`${STORE_KEY} Updates the active epg program for the active channel`,
|
|
props<{ program: EpgProgram }>()
|
|
);
|
|
|
|
export const resetActiveEpgProgram = createAction(
|
|
`${STORE_KEY} Reset active epg program`
|
|
);
|
|
|
|
export const setEpgAvailableFlag = createAction(
|
|
`${STORE_KEY} Reset active epg program`,
|
|
props<{ value: boolean }>()
|
|
);
|
|
|
|
export const setChannels = createAction(
|
|
`${STORE_KEY} Set channels`,
|
|
props<{ channels: Channel[] }>()
|
|
);
|
|
|
|
export const updatePlaylistPositions = createAction(
|
|
`${STORE_KEY} Update playlist positions`,
|
|
props<{
|
|
positionUpdates: { id: string; changes: { position: number } }[];
|
|
}>()
|
|
);
|
|
|
|
export const removeAllPlaylists = createAction(
|
|
`${STORE_KEY} Remove all playlists`
|
|
);
|
|
|
|
export const setAdjacentChannelAsActive = createAction(
|
|
`${STORE_KEY} Set adjacent channel as active`,
|
|
props<{
|
|
direction: 'next' | 'previous';
|
|
}>()
|
|
);
|
|
|
|
export const setSelectedFilters = createAction(
|
|
`${STORE_KEY} Set selected filters`,
|
|
props<{ selectedFilters: string[] }>()
|
|
);
|
|
|
|
export const setCurrentPlaylistId = createAction(
|
|
`${STORE_KEY} Set current playlist id`,
|
|
props<{ playlistId: string | undefined }>()
|
|
);
|