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 reactQueryClient from '@/utils/reactQueryClient'
import Main from './components/Main'
import TitleBar from './components/Titlebar'
import TitleBar from './components/TitleBar'
const App = () => {
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

View File

Before

Width:  |  Height:  |  Size: 570 B

After

Width:  |  Height:  |  Size: 570 B

View File

@ -55,6 +55,7 @@ const MediaControls = () => {
}
const FMCard = () => {
const navigate = useNavigate()
const [background, setBackground] = useState('')
const playerSnapshot = useSnapshot(player)
@ -83,7 +84,11 @@ const FMCard = () => {
style={{ background }}
>
{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>
)}

View File

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

View File

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

View File

@ -11,7 +11,7 @@ declare interface Playlist {
adType?: number
alg?: string
anonimous?: boolean
artists?: []
artists?: Artist[]
backgroundCoverId?: number
backgroundCoverUrl?: string | null
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;
}
img {
img,
a {
-webkit-user-drag: none;
}