mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
remove invalid detail view type for song list config
This commit is contained in:
@@ -21,7 +21,10 @@ import { ItemControls } from '/@/renderer/components/item-list/types';
|
|||||||
import { albumQueries } from '/@/renderer/features/albums/api/album-api';
|
import { albumQueries } from '/@/renderer/features/albums/api/album-api';
|
||||||
import { AlbumInfiniteCarousel } from '/@/renderer/features/albums/components/album-infinite-carousel';
|
import { AlbumInfiniteCarousel } from '/@/renderer/features/albums/components/album-infinite-carousel';
|
||||||
import { usePlayer } from '/@/renderer/features/player/context/player-context';
|
import { usePlayer } from '/@/renderer/features/player/context/player-context';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import {
|
import {
|
||||||
CLIENT_SIDE_SONG_FILTERS,
|
CLIENT_SIDE_SONG_FILTERS,
|
||||||
ListSortByDropdownControlled,
|
ListSortByDropdownControlled,
|
||||||
@@ -755,7 +758,10 @@ const AlbumDetailSongsTable = ({ songs }: AlbumDetailSongsTableProps) => {
|
|||||||
sortOrder={sortOrder}
|
sortOrder={sortOrder}
|
||||||
/>
|
/>
|
||||||
<ListConfigMenu
|
<ListConfigMenu
|
||||||
displayTypes={[{ hidden: true, value: ListDisplayType.GRID }]}
|
displayTypes={[
|
||||||
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
|
...SONG_DISPLAY_TYPES,
|
||||||
|
]}
|
||||||
listKey={ItemListKey.ALBUM_DETAIL}
|
listKey={ItemListKey.ALBUM_DETAIL}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
table: {
|
table: {
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ import { ItemControls } from '/@/renderer/components/item-list/types';
|
|||||||
import { artistsQueries } from '/@/renderer/features/artists/api/artists-api';
|
import { artistsQueries } from '/@/renderer/features/artists/api/artists-api';
|
||||||
import { AlbumArtistGridCarousel } from '/@/renderer/features/artists/components/album-artist-grid-carousel';
|
import { AlbumArtistGridCarousel } from '/@/renderer/features/artists/components/album-artist-grid-carousel';
|
||||||
import { useIsPlayerFetching, usePlayer } from '/@/renderer/features/player/context/player-context';
|
import { useIsPlayerFetching, usePlayer } from '/@/renderer/features/player/context/player-context';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import {
|
import {
|
||||||
CLIENT_SIDE_ALBUM_FILTERS,
|
CLIENT_SIDE_ALBUM_FILTERS,
|
||||||
ListSortByDropdownControlled,
|
ListSortByDropdownControlled,
|
||||||
@@ -448,7 +451,10 @@ const AlbumArtistMetadataTopSongsContent = ({
|
|||||||
value={topSongsQueryType}
|
value={topSongsQueryType}
|
||||||
/>
|
/>
|
||||||
<ListConfigMenu
|
<ListConfigMenu
|
||||||
displayTypes={[{ hidden: true, value: ListDisplayType.GRID }]}
|
displayTypes={[
|
||||||
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
|
...SONG_DISPLAY_TYPES,
|
||||||
|
]}
|
||||||
listKey={ItemListKey.SONG}
|
listKey={ItemListKey.SONG}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
table: {
|
table: {
|
||||||
@@ -706,7 +712,10 @@ const AlbumArtistMetadataFavoriteSongs = ({ routeId }: AlbumArtistMetadataFavori
|
|||||||
value={searchTerm}
|
value={searchTerm}
|
||||||
/>
|
/>
|
||||||
<ListConfigMenu
|
<ListConfigMenu
|
||||||
displayTypes={[{ hidden: true, value: ListDisplayType.GRID }]}
|
displayTypes={[
|
||||||
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
|
...SONG_DISPLAY_TYPES,
|
||||||
|
]}
|
||||||
listKey={ItemListKey.SONG}
|
listKey={ItemListKey.SONG}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
table: {
|
table: {
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
||||||
import { useFolderListFilters } from '/@/renderer/features/folders/hooks/use-folder-list-filters';
|
import { useFolderListFilters } from '/@/renderer/features/folders/hooks/use-folder-list-filters';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import { ListRefreshButton } from '/@/renderer/features/shared/components/list-refresh-button';
|
import { ListRefreshButton } from '/@/renderer/features/shared/components/list-refresh-button';
|
||||||
import { ListSortByDropdown } from '/@/renderer/features/shared/components/list-sort-by-dropdown';
|
import { ListSortByDropdown } from '/@/renderer/features/shared/components/list-sort-by-dropdown';
|
||||||
import { ListSortOrderToggleButton } from '/@/renderer/features/shared/components/list-sort-order-toggle-button';
|
import { ListSortOrderToggleButton } from '/@/renderer/features/shared/components/list-sort-order-toggle-button';
|
||||||
@@ -240,7 +243,10 @@ export const FolderListHeaderFilters = () => {
|
|||||||
</Group>
|
</Group>
|
||||||
<Group gap="sm" wrap="nowrap">
|
<Group gap="sm" wrap="nowrap">
|
||||||
<ListConfigMenu
|
<ListConfigMenu
|
||||||
displayTypes={[{ hidden: true, value: ListDisplayType.GRID }]}
|
displayTypes={[
|
||||||
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
|
...SONG_DISPLAY_TYPES,
|
||||||
|
]}
|
||||||
listKey={ItemListKey.SONG}
|
listKey={ItemListKey.SONG}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
grid: {
|
grid: {
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ import { queryKeys } from '/@/renderer/api/query-keys';
|
|||||||
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
||||||
import { usePlayer } from '/@/renderer/features/player/context/player-context';
|
import { usePlayer } from '/@/renderer/features/player/context/player-context';
|
||||||
import { useRestoreQueue, useSaveQueue } from '/@/renderer/features/player/hooks/use-queue-restore';
|
import { useRestoreQueue, useSaveQueue } from '/@/renderer/features/player/hooks/use-queue-restore';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import { SearchInput } from '/@/renderer/features/shared/components/search-input';
|
import { SearchInput } from '/@/renderer/features/shared/components/search-input';
|
||||||
import { useCurrentServer } from '/@/renderer/store';
|
import { useCurrentServer } from '/@/renderer/store';
|
||||||
import { hasFeature } from '/@/shared/api/utils';
|
import { hasFeature } from '/@/shared/api/utils';
|
||||||
@@ -64,10 +67,8 @@ export const PlayQueueListControls = ({
|
|||||||
/>
|
/>
|
||||||
<ListConfigMenu
|
<ListConfigMenu
|
||||||
displayTypes={[
|
displayTypes={[
|
||||||
{
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
hidden: true,
|
...SONG_DISPLAY_TYPES,
|
||||||
value: ListDisplayType.GRID,
|
|
||||||
},
|
|
||||||
]}
|
]}
|
||||||
listKey={type}
|
listKey={type}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ import {
|
|||||||
useIsRadioActive,
|
useIsRadioActive,
|
||||||
useRadioPlayer,
|
useRadioPlayer,
|
||||||
} from '/@/renderer/features/radio/hooks/use-radio-player';
|
} from '/@/renderer/features/radio/hooks/use-radio-player';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import { useFastAverageColor } from '/@/renderer/hooks';
|
import { useFastAverageColor } from '/@/renderer/hooks';
|
||||||
import {
|
import {
|
||||||
useFullScreenPlayerStore,
|
useFullScreenPlayerStore,
|
||||||
@@ -559,7 +562,10 @@ const Controls = () => {
|
|||||||
buttonProps={{
|
buttonProps={{
|
||||||
variant: 'subtle',
|
variant: 'subtle',
|
||||||
}}
|
}}
|
||||||
displayTypes={[{ hidden: true, value: ListDisplayType.GRID }]}
|
displayTypes={[
|
||||||
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
|
...SONG_DISPLAY_TYPES,
|
||||||
|
]}
|
||||||
listKey={ItemListKey.FULL_SCREEN}
|
listKey={ItemListKey.FULL_SCREEN}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
table: {
|
table: {
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import styles from './mobile-fullscreen-player.module.css';
|
import styles from './mobile-fullscreen-player.module.css';
|
||||||
|
|
||||||
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import {
|
import {
|
||||||
useFullScreenPlayerStore,
|
useFullScreenPlayerStore,
|
||||||
useFullScreenPlayerStoreActions,
|
useFullScreenPlayerStoreActions,
|
||||||
@@ -365,7 +368,10 @@ export const MobileFullscreenPlayerHeader = memo(
|
|||||||
buttonProps={{
|
buttonProps={{
|
||||||
variant: isPageHovered ? 'default' : 'subtle',
|
variant: isPageHovered ? 'default' : 'subtle',
|
||||||
}}
|
}}
|
||||||
displayTypes={[{ hidden: true, value: ListDisplayType.GRID }]}
|
displayTypes={[
|
||||||
|
{ hidden: true, value: ListDisplayType.GRID },
|
||||||
|
...SONG_DISPLAY_TYPES,
|
||||||
|
]}
|
||||||
listKey={ItemListKey.FULL_SCREEN}
|
listKey={ItemListKey.FULL_SCREEN}
|
||||||
optionsConfig={{
|
optionsConfig={{
|
||||||
table: {
|
table: {
|
||||||
|
|||||||
+5
-1
@@ -16,7 +16,10 @@ import { playlistsQueries } from '/@/renderer/features/playlists/api/playlists-a
|
|||||||
import { ClientSideSongFilters } from '/@/renderer/features/playlists/components/client-side-song-filters';
|
import { ClientSideSongFilters } from '/@/renderer/features/playlists/components/client-side-song-filters';
|
||||||
import { usePlaylistSongListFilters } from '/@/renderer/features/playlists/hooks/use-playlist-song-list-filters';
|
import { usePlaylistSongListFilters } from '/@/renderer/features/playlists/hooks/use-playlist-song-list-filters';
|
||||||
import { FilterButton } from '/@/renderer/features/shared/components/filter-button';
|
import { FilterButton } from '/@/renderer/features/shared/components/filter-button';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import { ListDisplayTypeToggleButton } from '/@/renderer/features/shared/components/list-display-type-toggle-button';
|
import { ListDisplayTypeToggleButton } from '/@/renderer/features/shared/components/list-display-type-toggle-button';
|
||||||
import { isFilterValueSet } from '/@/renderer/features/shared/components/list-filters';
|
import { isFilterValueSet } from '/@/renderer/features/shared/components/list-filters';
|
||||||
import { ListRefreshButton } from '/@/renderer/features/shared/components/list-refresh-button';
|
import { ListRefreshButton } from '/@/renderer/features/shared/components/list-refresh-button';
|
||||||
@@ -229,6 +232,7 @@ export const PlaylistDetailSongListHeaderFilters = ({
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ListConfigMenu
|
<ListConfigMenu
|
||||||
|
displayTypes={SONG_DISPLAY_TYPES}
|
||||||
listKey={listKey}
|
listKey={listKey}
|
||||||
tableColumnsData={PLAYLIST_SONG_TABLE_COLUMNS}
|
tableColumnsData={PLAYLIST_SONG_TABLE_COLUMNS}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ import {
|
|||||||
import { PageHeader } from '/@/renderer/components/page-header/page-header';
|
import { PageHeader } from '/@/renderer/components/page-header/page-header';
|
||||||
import { FilterBar } from '/@/renderer/features/shared/components/filter-bar';
|
import { FilterBar } from '/@/renderer/features/shared/components/filter-bar';
|
||||||
import { LibraryHeaderBar } from '/@/renderer/features/shared/components/library-header-bar';
|
import { LibraryHeaderBar } from '/@/renderer/features/shared/components/library-header-bar';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import { SearchInput } from '/@/renderer/features/shared/components/search-input';
|
import { SearchInput } from '/@/renderer/features/shared/components/search-input';
|
||||||
import { AppRoute } from '/@/renderer/router/routes';
|
import { AppRoute } from '/@/renderer/router/routes';
|
||||||
import { Button, ButtonGroup } from '/@/shared/components/button/button';
|
import { Button, ButtonGroup } from '/@/shared/components/button/button';
|
||||||
@@ -44,6 +47,7 @@ export const SearchHeader = ({ navigationId }: SearchHeaderProps) => {
|
|||||||
tableColumnsData: ALBUM_ARTIST_TABLE_COLUMNS,
|
tableColumnsData: ALBUM_ARTIST_TABLE_COLUMNS,
|
||||||
},
|
},
|
||||||
[LibraryItem.SONG]: {
|
[LibraryItem.SONG]: {
|
||||||
|
displayTypes: SONG_DISPLAY_TYPES,
|
||||||
listKey: ItemListKey.SONG,
|
listKey: ItemListKey.SONG,
|
||||||
tableColumnsData: SONG_TABLE_COLUMNS,
|
tableColumnsData: SONG_TABLE_COLUMNS,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ import { Table } from '/@/shared/components/table/table';
|
|||||||
import { useDisclosure } from '/@/shared/hooks/use-disclosure';
|
import { useDisclosure } from '/@/shared/hooks/use-disclosure';
|
||||||
import { ItemListKey, ListDisplayType } from '/@/shared/types/types';
|
import { ItemListKey, ListDisplayType } from '/@/shared/types/types';
|
||||||
|
|
||||||
|
export const SONG_DISPLAY_TYPES: ListConfigMenuDisplayTypeConfig[] = [
|
||||||
|
{ hidden: true, value: ListDisplayType.DETAIL },
|
||||||
|
];
|
||||||
|
|
||||||
const DISPLAY_TYPES = [
|
const DISPLAY_TYPES = [
|
||||||
{
|
{
|
||||||
label: (
|
label: (
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns';
|
||||||
import { useListContext } from '/@/renderer/context/list-context';
|
import { useListContext } from '/@/renderer/context/list-context';
|
||||||
import { useAlbumListFilters } from '/@/renderer/features/albums/hooks/use-album-list-filters';
|
import { useAlbumListFilters } from '/@/renderer/features/albums/hooks/use-album-list-filters';
|
||||||
import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu';
|
import {
|
||||||
|
ListConfigMenu,
|
||||||
|
SONG_DISPLAY_TYPES,
|
||||||
|
} from '/@/renderer/features/shared/components/list-config-menu';
|
||||||
import { ListDisplayTypeToggleButton } from '/@/renderer/features/shared/components/list-display-type-toggle-button';
|
import { ListDisplayTypeToggleButton } from '/@/renderer/features/shared/components/list-display-type-toggle-button';
|
||||||
import {
|
import {
|
||||||
isFilterValueSet,
|
isFilterValueSet,
|
||||||
@@ -91,7 +94,11 @@ export const SongListHeaderFilters = ({ toggleGenreTarget }: { toggleGenreTarget
|
|||||||
</Group>
|
</Group>
|
||||||
<Group gap="sm" wrap="nowrap">
|
<Group gap="sm" wrap="nowrap">
|
||||||
<ListDisplayTypeToggleButton listKey={ItemListKey.SONG} />
|
<ListDisplayTypeToggleButton listKey={ItemListKey.SONG} />
|
||||||
<ListConfigMenu listKey={ItemListKey.SONG} tableColumnsData={SONG_TABLE_COLUMNS} />
|
<ListConfigMenu
|
||||||
|
displayTypes={SONG_DISPLAY_TYPES}
|
||||||
|
listKey={ItemListKey.SONG}
|
||||||
|
tableColumnsData={SONG_TABLE_COLUMNS}
|
||||||
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user