mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
fix prettier/lint
This commit is contained in:
parent
121b036aaf
commit
271be93a96
26 changed files with 133 additions and 103 deletions
|
|
@ -143,8 +143,8 @@ const AlbumListRoute = () => {
|
|||
const title = artist
|
||||
? t('page.albumList.artistAlbums', { artist })
|
||||
: genreId
|
||||
? t('page.albumList.genreAlbums', { genre: titleCase(genreTitle) })
|
||||
: undefined;
|
||||
? t('page.albumList.genreAlbums', { genre: titleCase(genreTitle) })
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<AnimatedPage>
|
||||
|
|
|
|||
|
|
@ -287,13 +287,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
if (ctx.dataNodes) {
|
||||
const nodesToFavorite = ctx.dataNodes.filter((item) => !item.data.userFavorite);
|
||||
|
||||
const nodesByServerId = nodesToFavorite.reduce((acc, node) => {
|
||||
if (!acc[node.data.serverId]) {
|
||||
acc[node.data.serverId] = [];
|
||||
}
|
||||
acc[node.data.serverId].push(node);
|
||||
return acc;
|
||||
}, {} as Record<string, RowNode<any>[]>);
|
||||
const nodesByServerId = nodesToFavorite.reduce(
|
||||
(acc, node) => {
|
||||
if (!acc[node.data.serverId]) {
|
||||
acc[node.data.serverId] = [];
|
||||
}
|
||||
acc[node.data.serverId].push(node);
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, RowNode<any>[]>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(nodesByServerId)) {
|
||||
const nodes = nodesByServerId[serverId];
|
||||
|
|
@ -324,13 +327,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
}
|
||||
} else {
|
||||
const itemsToFavorite = ctx.data.filter((item) => !item.userFavorite);
|
||||
const itemsByServerId = (itemsToFavorite as any[]).reduce((acc, item) => {
|
||||
if (!acc[item.serverId]) {
|
||||
acc[item.serverId] = [];
|
||||
}
|
||||
acc[item.serverId].push(item);
|
||||
return acc;
|
||||
}, {} as Record<string, AnyLibraryItems>);
|
||||
const itemsByServerId = (itemsToFavorite as any[]).reduce(
|
||||
(acc, item) => {
|
||||
if (!acc[item.serverId]) {
|
||||
acc[item.serverId] = [];
|
||||
}
|
||||
acc[item.serverId].push(item);
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, AnyLibraryItems>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(itemsByServerId)) {
|
||||
const items = itemsByServerId[serverId];
|
||||
|
|
@ -361,13 +367,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
|
||||
if (ctx.dataNodes) {
|
||||
const nodesToUnfavorite = ctx.dataNodes.filter((item) => item.data.userFavorite);
|
||||
const nodesByServerId = nodesToUnfavorite.reduce((acc, node) => {
|
||||
if (!acc[node.data.serverId]) {
|
||||
acc[node.data.serverId] = [];
|
||||
}
|
||||
acc[node.data.serverId].push(node);
|
||||
return acc;
|
||||
}, {} as Record<string, RowNode<any>[]>);
|
||||
const nodesByServerId = nodesToUnfavorite.reduce(
|
||||
(acc, node) => {
|
||||
if (!acc[node.data.serverId]) {
|
||||
acc[node.data.serverId] = [];
|
||||
}
|
||||
acc[node.data.serverId].push(node);
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, RowNode<any>[]>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(nodesByServerId)) {
|
||||
const idsToUnfavorite = nodesByServerId[serverId].map((node) => node.data.id);
|
||||
|
|
@ -390,13 +399,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
}
|
||||
} else {
|
||||
const itemsToUnfavorite = ctx.data.filter((item) => item.userFavorite);
|
||||
const itemsByServerId = (itemsToUnfavorite as any[]).reduce((acc, item) => {
|
||||
if (!acc[item.serverId]) {
|
||||
acc[item.serverId] = [];
|
||||
}
|
||||
acc[item.serverId].push(item);
|
||||
return acc;
|
||||
}, {} as Record<string, AnyLibraryItems>);
|
||||
const itemsByServerId = (itemsToUnfavorite as any[]).reduce(
|
||||
(acc, item) => {
|
||||
if (!acc[item.serverId]) {
|
||||
acc[item.serverId] = [];
|
||||
}
|
||||
acc[item.serverId].push(item);
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, AnyLibraryItems>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(itemsByServerId)) {
|
||||
const idsToUnfavorite = itemsByServerId[serverId].map(
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ const StyledText = styled(TextTitle)<TitleProps & { $alignment: string; $fontSiz
|
|||
text-align: ${(props) => props.$alignment};
|
||||
opacity: 0.5;
|
||||
|
||||
transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
|
||||
transition:
|
||||
opacity 0.3s ease-in-out,
|
||||
transform 0.3s ease-in-out;
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ const SynchronizedLyricsContainer = styled.div<{ $gap: number }>`
|
|||
height: 100%;
|
||||
padding: 10vh 0 50vh;
|
||||
overflow: scroll;
|
||||
transform: translateY(-2rem);
|
||||
word-break: break-word;
|
||||
transform: translateY(-2rem);
|
||||
|
||||
-webkit-mask-image: linear-gradient(
|
||||
180deg,
|
||||
|
|
@ -180,9 +180,12 @@ export const SynchronizedLyrics = ({
|
|||
|
||||
const elapsed = performance.now() - start;
|
||||
|
||||
lyricTimer.current = setTimeout(() => {
|
||||
setCurrentLyric(nextTime, nextEpoch, index + 1);
|
||||
}, nextTime - timeInMs - elapsed);
|
||||
lyricTimer.current = setTimeout(
|
||||
() => {
|
||||
setCurrentLyric(nextTime, nextEpoch, index + 1);
|
||||
},
|
||||
nextTime - timeInMs - elapsed,
|
||||
);
|
||||
}
|
||||
},
|
||||
[],
|
||||
|
|
|
|||
|
|
@ -271,14 +271,14 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
postProcess: 'sentenceCase',
|
||||
})
|
||||
: repeat === PlayerRepeat.ALL
|
||||
? t('player.repeat', {
|
||||
context: 'all',
|
||||
postProcess: 'sentenceCase',
|
||||
})
|
||||
: t('player.repeat', {
|
||||
context: 'one',
|
||||
postProcess: 'sentenceCase',
|
||||
})
|
||||
? t('player.repeat', {
|
||||
context: 'all',
|
||||
postProcess: 'sentenceCase',
|
||||
})
|
||||
: t('player.repeat', {
|
||||
context: 'one',
|
||||
postProcess: 'sentenceCase',
|
||||
})
|
||||
}`,
|
||||
}}
|
||||
variant="tertiary"
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ const StyledPlayerButton = styled(UnstyledButton)<StyledPlayerButtonProps>`
|
|||
variant === 'main'
|
||||
? ButtonMainVariant
|
||||
: variant === 'secondary'
|
||||
? ButtonSecondaryVariant
|
||||
: ButtonTertiaryVariant};
|
||||
? ButtonSecondaryVariant
|
||||
: ButtonTertiaryVariant};
|
||||
`;
|
||||
|
||||
export const PlayerButton = forwardRef<HTMLDivElement, PlayerButtonProps>(
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { LibraryItem } from '/@/renderer/api/types';
|
|||
import { usePlayQueueAdd } from '/@/renderer/features/player';
|
||||
|
||||
interface CommandPaletteProps {
|
||||
modalProps: typeof useDisclosure['arguments'];
|
||||
modalProps: (typeof useDisclosure)['arguments'];
|
||||
}
|
||||
|
||||
const CustomModal = styled(Modal)`
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ export const ThemeSettings = () => {
|
|||
e.currentTarget.checked
|
||||
? 'system'
|
||||
: settings.theme === AppTheme.DEFAULT_DARK
|
||||
? 'dark'
|
||||
: 'light',
|
||||
? 'dark'
|
||||
: 'light',
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -200,18 +200,21 @@ export const HotkeyManagerSettings = () => {
|
|||
);
|
||||
|
||||
const duplicateHotkeyMap = useMemo(() => {
|
||||
const countPerHotkey = Object.values(bindings).reduce((acc, key) => {
|
||||
const hotkey = key.hotkey;
|
||||
if (!hotkey) return acc;
|
||||
const countPerHotkey = Object.values(bindings).reduce(
|
||||
(acc, key) => {
|
||||
const hotkey = key.hotkey;
|
||||
if (!hotkey) return acc;
|
||||
|
||||
if (acc[hotkey]) {
|
||||
acc[hotkey] += 1;
|
||||
} else {
|
||||
acc[hotkey] = 1;
|
||||
}
|
||||
if (acc[hotkey]) {
|
||||
acc[hotkey] += 1;
|
||||
} else {
|
||||
acc[hotkey] = 1;
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {} as Record<string, number>);
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, number>,
|
||||
);
|
||||
|
||||
const duplicateKeys = Object.keys(countPerHotkey).filter((key) => countPerHotkey[key] > 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -138,8 +138,8 @@ const TrackListRoute = () => {
|
|||
const title = artist
|
||||
? t('page.trackList.artistTracks', { artist })
|
||||
: genreId
|
||||
? t('page.trackList.genreTracks', { genre: titleCase(genreTitle) })
|
||||
: undefined;
|
||||
? t('page.trackList.genreTracks', { genre: titleCase(genreTitle) })
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<AnimatedPage>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue