import { SupportedLanguage } from '@/web/i18n/i18n'
import persistedUiStates from '@/web/states/persistedUiStates'
import settings from '@/web/states/settings'
import { useTranslation } from 'react-i18next'
import { useSnapshot } from 'valtio'
import { BlockTitle, OptionText, Select, Option, Switch } from './Controls'
function General() {
return (
)
}
function Language() {
const { t } = useTranslation()
const supportedLanguages: { name: string; value: SupportedLanguage }[] = [
{ name: 'English', value: 'en-US' },
{ name: '简体中文', value: 'zh-CN' },
]
const { language } = useSnapshot(settings)
const setLanguage = (language: SupportedLanguage) => {
settings.language = language
}
return (
<>
Language
>
)
}
function AppleMusic() {
const { playAnimatedArtworkFromApple, priorityDisplayOfAlbumArtistDescriptionFromAppleMusic } =
useSnapshot(settings)
return (
Apple Music
)
}
function NeteaseMusic() {
const { displayPlaylistsFromNeteaseMusic } = useSnapshot(settings)
return (
Netease Music
)
}
export default General