Improve Jellyfin/Navidrome Album/Song filter, Navidrome artist recent release

- Use `compilation=false` for Navidrome recent releases with artist credit
- Add `YesNoSelect` (yes, no, undefined) for `favorite` for Navidrome/Jellyfin `album`/`track`, and Navidrome `compilation`
- Fix folderButton translation
This commit is contained in:
Kendall Garner 2025-06-29 22:14:06 -07:00
parent b5bdea1845
commit 5456c2c2b8
No known key found for this signature in database
GPG key ID: 9355F387FE765C94
10 changed files with 119 additions and 62 deletions

View file

@ -0,0 +1,33 @@
import { useTranslation } from 'react-i18next';
import { Select, SelectProps } from '/@/shared/components/select/select';
export interface YesNoSelectProps extends Omit<SelectProps, 'data' | 'onChange' | 'value'> {
onChange: (e?: boolean) => void;
value?: boolean;
}
export const YesNoSelect = ({ onChange, value, ...props }: YesNoSelectProps) => {
const { t } = useTranslation();
return (
<Select
clearable
data={[
{
label: t('common.no', { postProcess: 'sentenceCase' }),
value: 'false',
},
{
label: t('common.yes', { postProcess: 'sentenceCase' }),
value: 'true',
},
]}
onChange={(e) => {
onChange(e ? e === 'true' : undefined);
}}
value={value !== undefined ? value.toString() : undefined}
{...props}
/>
);
};