feat: 其他小更新

This commit is contained in:
qier222 2022-04-05 02:32:13 +08:00
parent 2e41001d02
commit db5730dfdd
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
12 changed files with 33 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import Player from '@/components/Player'
import Sidebar from '@/components/Sidebar' import Sidebar from '@/components/Sidebar'
import reactQueryClient from '@/utils/reactQueryClient' import reactQueryClient from '@/utils/reactQueryClient'
import Main from './components/Main' import Main from './components/Main'
import TitleBar from './components/Titlebar' import TitleBar from './components/TitleBar'
const App = () => { const App = () => {
return ( return (

View file

@ -1 +0,0 @@
<svg width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 5.75A2.75 2.75 0 0 1 5.75 3h12.5A2.75 2.75 0 0 1 21 5.75v12.5A2.75 2.75 0 0 1 18.25 21H5.75A2.75 2.75 0 0 1 3 18.25V5.75ZM5.75 4.5c-.69 0-1.25.56-1.25 1.25v12.5c0 .69.56 1.25 1.25 1.25h12.5c.69 0 1.25-.56 1.25-1.25V5.75c0-.69-.56-1.25-1.25-1.25H5.75Z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 387 B

View file

@ -0,0 +1 @@
<svg width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5.75 3h12.5A2.75 2.75 0 0 1 21 5.75v12.5A2.75 2.75 0 0 1 18.25 21H5.75A2.75 2.75 0 0 1 3 18.25V5.75A2.75 2.75 0 0 1 5.75 3Zm0 1.5c-.69 0-1.25.56-1.25 1.25v12.5c0 .69.56 1.25 1.25 1.25h12.5c.69 0 1.25-.56 1.25-1.25V5.75c0-.69-.56-1.25-1.25-1.25H5.75Z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 384 B

View file

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 570 B

After

Width:  |  Height:  |  Size: 570 B

Before After
Before After

View file

@ -55,6 +55,7 @@ const MediaControls = () => {
} }
const FMCard = () => { const FMCard = () => {
const navigate = useNavigate()
const [background, setBackground] = useState('') const [background, setBackground] = useState('')
const playerSnapshot = useSnapshot(player) const playerSnapshot = useSnapshot(player)
@ -83,7 +84,11 @@ const FMCard = () => {
style={{ background }} style={{ background }}
> >
{coverUrl ? ( {coverUrl ? (
<img className='rounded-lg shadow-2xl' src={coverUrl} /> <img
onClick={() => track?.al?.id && navigate(`/album/${track.al.id}`)}
className='rounded-lg shadow-2xl'
src={coverUrl}
/>
) : ( ) : (
<div className='aspect-square h-full rounded-lg bg-gray-200 dark:bg-white/5'></div> <div className='aspect-square h-full rounded-lg bg-gray-200 dark:bg-white/5'></div>
)} )}

View file

@ -7,16 +7,26 @@ import Playlist from '@/pages/Playlist'
import Artist from '@/pages/Artist' import Artist from '@/pages/Artist'
import Search from '@/pages/Search' import Search from '@/pages/Search'
import Library from '@/pages/Library' import Library from '@/pages/Library'
import Podcast from '@/pages/Podcast'
import Settings from '@/pages/Settings'
const routes: RouteObject[] = [ const routes: RouteObject[] = [
{ {
path: '/', path: '/',
element: <Home />, element: <Home />,
}, },
{
path: '/podcast',
element: <Podcast />,
},
{ {
path: '/library', path: '/library',
element: <Library />, element: <Library />,
}, },
{
path: '/settings',
element: <Settings />,
},
{ {
path: '/login', path: '/login',
element: <Login />, element: <Login />,

View file

@ -6,10 +6,10 @@ const TitleBar = () => {
<div className='ml-2 text-sm text-gray-500'>YesPlayMusic</div> <div className='ml-2 text-sm text-gray-500'>YesPlayMusic</div>
<div className='flex h-full'> <div className='flex h-full'>
<button className='flex w-[2.875rem] items-center justify-center hover:bg-[#e9e9e9]'> <button className='flex w-[2.875rem] items-center justify-center hover:bg-[#e9e9e9]'>
<SvgIcon className='h-3 w-3' name='windows-min' /> <SvgIcon className='h-3 w-3' name='windows-minimize' />
</button> </button>
<button className='flex w-[2.875rem] items-center justify-center hover:bg-[#e9e9e9]'> <button className='flex w-[2.875rem] items-center justify-center hover:bg-[#e9e9e9]'>
<SvgIcon className='h-3 w-3' name='windows-max' /> <SvgIcon className='h-3 w-3' name='windows-maximize' />
</button> </button>
<button className='flex w-[2.875rem] items-center justify-center hover:bg-[#c42b1c] hover:text-white'> <button className='flex w-[2.875rem] items-center justify-center hover:bg-[#c42b1c] hover:text-white'>
<SvgIcon className='h-3 w-3' name='windows-close' /> <SvgIcon className='h-3 w-3' name='windows-close' />

View file

@ -11,7 +11,7 @@ declare interface Playlist {
adType?: number adType?: number
alg?: string alg?: string
anonimous?: boolean anonimous?: boolean
artists?: [] artists?: Artist[]
backgroundCoverId?: number backgroundCoverId?: number
backgroundCoverUrl?: string | null backgroundCoverUrl?: string | null
creator: User creator: User

View file

@ -0,0 +1,5 @@
const Podcast = () => {
return <div>...</div>
}
export default Podcast

View file

@ -0,0 +1,5 @@
const Settings = () => {
return <div></div>
}
export default Settings

View file

@ -112,6 +112,7 @@ button {
cursor: default; cursor: default;
} }
img { img,
a {
-webkit-user-drag: none; -webkit-user-drag: none;
} }