mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
chore: upgrade dependencies (#1906)
* upgrade dependencies * downgrade fast-average-color
This commit is contained in:
@@ -11,8 +11,10 @@ import { useWindowSettings } from '/@/renderer/store/settings.store';
|
||||
import { Flex, FlexProps } from '/@/shared/components/flex/flex';
|
||||
import { Platform } from '/@/shared/types/types';
|
||||
|
||||
export interface PageHeaderProps
|
||||
extends Omit<FlexProps, 'onAnimationStart' | 'onDrag' | 'onDragEnd' | 'onDragStart'> {
|
||||
export interface PageHeaderProps extends Omit<
|
||||
FlexProps,
|
||||
'onAnimationStart' | 'onDrag' | 'onDragEnd' | 'onDragStart'
|
||||
> {
|
||||
animated?: boolean;
|
||||
backgroundColor?: string;
|
||||
children?: ReactNode;
|
||||
|
||||
@@ -54,15 +54,15 @@ export const AlbumListHeaderFilters = ({ toggleGenreTarget }: { toggleGenreTarge
|
||||
|
||||
return Boolean(
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM._CUSTOM]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.ARTIST_IDS]) ||
|
||||
query[FILTER_KEYS.ALBUM.COMPILATION] !== undefined ||
|
||||
query[FILTER_KEYS.ALBUM.FAVORITE] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.GENRE_ID]) ||
|
||||
query[FILTER_KEYS.ALBUM.HAS_RATING] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.MAX_YEAR]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.MIN_YEAR]) ||
|
||||
query[FILTER_KEYS.ALBUM.RECENTLY_PLAYED] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SHARED.SEARCH_TERM]),
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.ARTIST_IDS]) ||
|
||||
query[FILTER_KEYS.ALBUM.COMPILATION] !== undefined ||
|
||||
query[FILTER_KEYS.ALBUM.FAVORITE] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.GENRE_ID]) ||
|
||||
query[FILTER_KEYS.ALBUM.HAS_RATING] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.MAX_YEAR]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.ALBUM.MIN_YEAR]) ||
|
||||
query[FILTER_KEYS.ALBUM.RECENTLY_PLAYED] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SHARED.SEARCH_TERM]),
|
||||
);
|
||||
}, [albumFilters.query]);
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
interface AlbumArtistListInfiniteGridProps
|
||||
extends ItemListGridComponentProps<AlbumArtistListQuery> {}
|
||||
interface AlbumArtistListInfiniteGridProps extends ItemListGridComponentProps<AlbumArtistListQuery> {}
|
||||
|
||||
export const AlbumArtistListInfiniteGrid = ({
|
||||
gap = 'md',
|
||||
|
||||
@@ -17,8 +17,7 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
interface AlbumArtistListInfiniteTableProps
|
||||
extends ItemListTableComponentProps<AlbumArtistListQuery> {}
|
||||
interface AlbumArtistListInfiniteTableProps extends ItemListTableComponentProps<AlbumArtistListQuery> {}
|
||||
|
||||
export const AlbumArtistListInfiniteTable = ({
|
||||
autoFitColumns = false,
|
||||
|
||||
@@ -18,8 +18,7 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
interface AlbumArtistListPaginatedGridProps
|
||||
extends ItemListGridComponentProps<AlbumArtistListQuery> {}
|
||||
interface AlbumArtistListPaginatedGridProps extends ItemListGridComponentProps<AlbumArtistListQuery> {}
|
||||
|
||||
export const AlbumArtistListPaginatedGrid = ({
|
||||
gap = 'md',
|
||||
|
||||
@@ -19,8 +19,7 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
interface AlbumArtistListPaginatedTableProps
|
||||
extends ItemListTableComponentProps<AlbumArtistListQuery> {}
|
||||
interface AlbumArtistListPaginatedTableProps extends ItemListTableComponentProps<AlbumArtistListQuery> {}
|
||||
|
||||
export const AlbumArtistListPaginatedTable = ({
|
||||
autoFitColumns = false,
|
||||
|
||||
@@ -347,7 +347,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
innerProps: {
|
||||
...modalProps,
|
||||
},
|
||||
modalKey: 'addToPlaylist',
|
||||
modal: 'addToPlaylist',
|
||||
size: 'lg',
|
||||
title: t('page.contextMenu.addToPlaylist', { postProcess: 'sentenceCase' }),
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ export const ShareAction = ({ ids, itemType }: ShareActionProps) => {
|
||||
itemIds: ids,
|
||||
resourceType,
|
||||
},
|
||||
modalKey: 'shareItem',
|
||||
modal: 'shareItem',
|
||||
title: t('page.contextMenu.shareItem', { postProcess: 'titleCase' }),
|
||||
});
|
||||
}, [ids, resourceType, t]);
|
||||
|
||||
@@ -5,7 +5,7 @@ import i18n from '/@/i18n/i18n';
|
||||
export const openLyricsSettingsModal = (settingsKey: string = 'default') => {
|
||||
openContextModal({
|
||||
innerProps: { settingsKey },
|
||||
modalKey: 'lyricsSettings',
|
||||
modal: 'lyricsSettings',
|
||||
overlayProps: {
|
||||
blur: 0,
|
||||
opacity: 0,
|
||||
|
||||
@@ -189,7 +189,7 @@ const randomFetchQuery = (args: {
|
||||
export const openShuffleAllModal = async () => {
|
||||
openContextModal({
|
||||
innerProps: {},
|
||||
modalKey: 'shuffleAll',
|
||||
modal: 'shuffleAll',
|
||||
size: 'sm',
|
||||
title: i18n.t('player.playRandom', { postProcess: 'sentenceCase' }) as string,
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import i18n from '/@/i18n/i18n';
|
||||
export const openVisualizerSettingsModal = () => {
|
||||
openContextModal({
|
||||
innerProps: {},
|
||||
modalKey: 'visualizerSettings',
|
||||
modal: 'visualizerSettings',
|
||||
overlayProps: {
|
||||
blur: 0,
|
||||
opacity: 0,
|
||||
|
||||
@@ -20,8 +20,10 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
interface PlaylistDetailSongListGridProps
|
||||
extends Omit<ItemListGridComponentProps<PlaylistSongListQuery>, 'query'> {
|
||||
interface PlaylistDetailSongListGridProps extends Omit<
|
||||
ItemListGridComponentProps<PlaylistSongListQuery>,
|
||||
'query'
|
||||
> {
|
||||
currentPage?: number;
|
||||
data: PlaylistSongListResponse;
|
||||
items?: Song[];
|
||||
|
||||
+7
-7
@@ -60,12 +60,12 @@ const PlaylistSongListFiltersModal = () => {
|
||||
const hasActiveFilters = useMemo(() => {
|
||||
return Boolean(
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.ALBUM_ARTIST_IDS]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.ARTIST_IDS]) ||
|
||||
query[FILTER_KEYS.SONG.FAVORITE] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.GENRE_ID]) ||
|
||||
query[FILTER_KEYS.SONG.HAS_RATING] !== undefined ||
|
||||
query[FILTER_KEYS.SONG.MAX_YEAR] !== undefined ||
|
||||
query[FILTER_KEYS.SONG.MIN_YEAR] !== undefined,
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.ARTIST_IDS]) ||
|
||||
query[FILTER_KEYS.SONG.FAVORITE] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.GENRE_ID]) ||
|
||||
query[FILTER_KEYS.SONG.HAS_RATING] !== undefined ||
|
||||
query[FILTER_KEYS.SONG.MAX_YEAR] !== undefined ||
|
||||
query[FILTER_KEYS.SONG.MIN_YEAR] !== undefined,
|
||||
);
|
||||
}, [query]);
|
||||
|
||||
@@ -258,7 +258,7 @@ export const openSaveAndReplaceModal = (
|
||||
) => {
|
||||
openContextModal({
|
||||
innerProps: { onSuccess, playlistId, songIds },
|
||||
modalKey: 'saveAndReplace',
|
||||
modal: 'saveAndReplace',
|
||||
size: 'sm',
|
||||
title: i18n.t('common.saveAndReplace', { postProcess: 'titleCase' }) as string,
|
||||
});
|
||||
|
||||
@@ -23,8 +23,10 @@ import {
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ItemListKey, Play, TableColumn } from '/@/shared/types/types';
|
||||
|
||||
interface PlaylistDetailSongListTableProps
|
||||
extends Omit<ItemListTableComponentProps<PlaylistSongListQuery>, 'query'> {
|
||||
interface PlaylistDetailSongListTableProps extends Omit<
|
||||
ItemListTableComponentProps<PlaylistSongListQuery>,
|
||||
'query'
|
||||
> {
|
||||
currentPage?: number;
|
||||
data: PlaylistSongListResponse;
|
||||
items?: Song[];
|
||||
|
||||
@@ -30,7 +30,7 @@ export const openUpdatePlaylistModal = async (args: { playlist: Playlist }) => {
|
||||
},
|
||||
query: { id: playlist?.id },
|
||||
},
|
||||
modalKey: 'updatePlaylist',
|
||||
modal: 'updatePlaylist',
|
||||
size: hasImageUpload ? 'lg' : 'md',
|
||||
title: i18n.t('form.editPlaylist.title', { postProcess: 'titleCase' }) as string,
|
||||
});
|
||||
|
||||
@@ -213,8 +213,8 @@ const PlaylistDetailSongListRoute = () => {
|
||||
|
||||
const isSmartPlaylist = Boolean(
|
||||
!detailQuery?.isLoading &&
|
||||
detailQuery?.data?.rules &&
|
||||
server?.type === ServerType.NAVIDROME,
|
||||
detailQuery?.data?.rules &&
|
||||
server?.type === ServerType.NAVIDROME,
|
||||
);
|
||||
|
||||
const [showQueryBuilder, setShowQueryBuilder] = useState(false);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Command } from 'cmdk';
|
||||
import { ComponentPropsWithoutRef, ReactNode, useEffect, useRef, useState } from 'react';
|
||||
|
||||
interface CommandItemSelectableProps
|
||||
extends Omit<ComponentPropsWithoutRef<typeof Command.Item>, 'children'> {
|
||||
interface CommandItemSelectableProps extends Omit<
|
||||
ComponentPropsWithoutRef<typeof Command.Item>,
|
||||
'children'
|
||||
> {
|
||||
children: (args: { isHighlighted: boolean }) => ReactNode;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export const ServerList = () => {
|
||||
<AddServerForm onCancel={() => vars.context.closeModal(vars.id)} />
|
||||
),
|
||||
},
|
||||
modalKey: 'base',
|
||||
modal: 'base',
|
||||
title: t('form.addServer.title', { postProcess: 'titleCase' }),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import { openContextModal } from '@mantine/modals';
|
||||
export const openSettingsModal = () => {
|
||||
openContextModal({
|
||||
innerProps: {},
|
||||
modalKey: 'settings',
|
||||
modal: 'settings',
|
||||
overlayProps: {
|
||||
opacity: 1,
|
||||
},
|
||||
|
||||
@@ -183,7 +183,7 @@ const PlaylistRowButton = memo(
|
||||
|
||||
openContextModal({
|
||||
innerProps: modalProps,
|
||||
modalKey: 'addToPlaylist',
|
||||
modal: 'addToPlaylist',
|
||||
size: 'lg',
|
||||
title: t('form.addToPlaylist.title', { postProcess: 'titleCase' }),
|
||||
});
|
||||
|
||||
@@ -55,12 +55,12 @@ export const SongListHeaderFilters = ({ toggleGenreTarget }: { toggleGenreTarget
|
||||
const query = songFilters.query;
|
||||
return Boolean(
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG._CUSTOM]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.ARTIST_IDS]) ||
|
||||
query[FILTER_KEYS.SONG.FAVORITE] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.GENRE_ID]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.MAX_YEAR]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.MIN_YEAR]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SHARED.SEARCH_TERM]),
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.ARTIST_IDS]) ||
|
||||
query[FILTER_KEYS.SONG.FAVORITE] !== undefined ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.GENRE_ID]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.MAX_YEAR]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SONG.MIN_YEAR]) ||
|
||||
isFilterValueSet(query[FILTER_KEYS.SHARED.SEARCH_TERM]),
|
||||
);
|
||||
}, [songFilters.query]);
|
||||
|
||||
|
||||
@@ -173,11 +173,11 @@ const ShareItemContextModal = (props: any) => (
|
||||
);
|
||||
|
||||
const LazyVisualizerSettingsContextModal = lazy(() =>
|
||||
import(
|
||||
'/@/renderer/features/visualizer/components/audiomotionanalyzer/visualizer-settings-modal'
|
||||
).then((module) => ({
|
||||
default: module.VisualizerSettingsContextModal,
|
||||
})),
|
||||
import('/@/renderer/features/visualizer/components/audiomotionanalyzer/visualizer-settings-modal').then(
|
||||
(module) => ({
|
||||
default: module.VisualizerSettingsContextModal,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
const VisualizerSettingsContextModal = (props: any) => (
|
||||
|
||||
@@ -7,8 +7,10 @@ import styles from './accordion.module.css';
|
||||
|
||||
import { Icon } from '/@/shared/components/icon/icon';
|
||||
|
||||
export interface AccordionProps
|
||||
extends Omit<MantineAccordionProps, 'defaultValue' | 'multiple' | 'onChange'> {
|
||||
export interface AccordionProps extends Omit<
|
||||
MantineAccordionProps,
|
||||
'defaultValue' | 'multiple' | 'onChange'
|
||||
> {
|
||||
defaultValue?: string | string[];
|
||||
multiple?: boolean;
|
||||
onChange?: (value: null | string | string[]) => void;
|
||||
|
||||
@@ -18,8 +18,7 @@ const isCompactSize = (size: number | string | undefined): boolean => {
|
||||
};
|
||||
|
||||
export interface ActionIconProps
|
||||
extends ElementProps<'button', keyof MantineActionIconProps>,
|
||||
MantineActionIconProps {
|
||||
extends ElementProps<'button', keyof MantineActionIconProps>, MantineActionIconProps {
|
||||
icon?: keyof typeof AppIcon;
|
||||
iconProps?: Omit<IconProps, 'icon'>;
|
||||
stopsPropagation?: boolean;
|
||||
|
||||
@@ -10,8 +10,7 @@ import styles from './badge.module.css';
|
||||
import { createPolymorphicComponent } from '/@/shared/utils/create-polymorphic-component';
|
||||
|
||||
export interface BadgeProps
|
||||
extends ElementProps<'div', keyof MantineBadgeProps>,
|
||||
MantineBadgeProps {}
|
||||
extends ElementProps<'div', keyof MantineBadgeProps>, MantineBadgeProps {}
|
||||
|
||||
const BaseBadge = ({ children, classNames, variant = 'default', ...props }: BadgeProps) => {
|
||||
const memoizedClassNames = useMemo(
|
||||
|
||||
@@ -11,7 +11,8 @@ import { useTimeout } from '/@/shared/hooks/use-timeout';
|
||||
import { createPolymorphicComponent } from '/@/shared/utils/create-polymorphic-component';
|
||||
|
||||
export interface ButtonProps
|
||||
extends ElementProps<'button', keyof MantineButtonProps>,
|
||||
extends
|
||||
ElementProps<'button', keyof MantineButtonProps>,
|
||||
MantineButtonProps,
|
||||
MantineButtonProps {
|
||||
tooltip?: Omit<TooltipProps, 'children'>;
|
||||
|
||||
@@ -97,7 +97,7 @@ export function BaseImage({
|
||||
|
||||
const shouldLoadImage = Boolean(
|
||||
effectiveImageRequest &&
|
||||
(!enableViewport || isInSessionCache || inViewport || hasLoadedInInstance),
|
||||
(!enableViewport || isInSessionCache || inViewport || hasLoadedInInstance),
|
||||
);
|
||||
|
||||
const nativeImage = useNativeImage({
|
||||
|
||||
@@ -62,8 +62,7 @@ const PillGroup = ({ children, classNames, gap = 'sm', ...props }: PillGroupProp
|
||||
Pill.Group = PillGroup;
|
||||
|
||||
interface PillLinkProps
|
||||
extends Omit<React.ComponentPropsWithoutRef<typeof Link>, keyof PillProps>,
|
||||
PillProps {}
|
||||
extends Omit<React.ComponentPropsWithoutRef<typeof Link>, keyof PillProps>, PillProps {}
|
||||
|
||||
export const PillLink = forwardRef<HTMLDivElement, PillLinkProps>(({ children, ...props }, ref) => {
|
||||
const { classNames, radius = 'md', size = 'md', ...rest } = props;
|
||||
|
||||
Reference in New Issue
Block a user