mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: updates
This commit is contained in:
parent
9a52681687
commit
840a5b8e9b
104 changed files with 1645 additions and 13494 deletions
53
packages/web/pages/Settings/Player.tsx
Normal file
53
packages/web/pages/Settings/Player.tsx
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import settings from '@/web/states/settings'
|
||||
import toast from 'react-hot-toast'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useSnapshot } from 'valtio'
|
||||
import { BlockDescription, BlockTitle, Button, Option, OptionText, Switch } from './Controls'
|
||||
|
||||
function Player() {
|
||||
return (
|
||||
<div>
|
||||
<FindTrackOnYouTube />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function FindTrackOnYouTube() {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { enableFindTrackOnYouTube, httpProxyForYouTube } = useSnapshot(settings)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<BlockTitle>{t`settings.player-youtube-unlock`}</BlockTitle>
|
||||
<BlockDescription>
|
||||
Find alternative track on YouTube if not available on NetEase.
|
||||
</BlockDescription>
|
||||
|
||||
{/* Switch */}
|
||||
<Option>
|
||||
<OptionText>Enable YouTube Unlock </OptionText>
|
||||
<Switch
|
||||
enabled={enableFindTrackOnYouTube}
|
||||
onChange={value => (settings.enableFindTrackOnYouTube = value)}
|
||||
/>
|
||||
</Option>
|
||||
|
||||
{/* Proxy */}
|
||||
{/* <Option>
|
||||
<OptionText>
|
||||
HTTP Proxy config for connecting to YouTube {httpProxyForYouTube?.host && '(Configured)'}
|
||||
</OptionText>
|
||||
<Button
|
||||
onClick={() => {
|
||||
toast('开发中')
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
</Option> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Player
|
||||
Loading…
Add table
Add a link
Reference in a new issue