mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: 其他小更新
This commit is contained in:
parent
2e41001d02
commit
db5730dfdd
12 changed files with 33 additions and 7 deletions
|
|
@ -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 (
|
||||||
|
|
|
||||||
|
|
@ -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 |
1
src/renderer/assets/icons/windows-maximize.svg
Normal file
1
src/renderer/assets/icons/windows-maximize.svg
Normal 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 |
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
|
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 570 B |
|
|
@ -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>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -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 />,
|
||||||
|
|
|
||||||
|
|
@ -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' />
|
||||||
|
|
|
||||||
2
src/renderer/interface.d.ts
vendored
2
src/renderer/interface.d.ts
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
5
src/renderer/pages/Podcast.tsx
Normal file
5
src/renderer/pages/Podcast.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
const Podcast = () => {
|
||||||
|
return <div>施工中...</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Podcast
|
||||||
5
src/renderer/pages/Settings.tsx
Normal file
5
src/renderer/pages/Settings.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
const Settings = () => {
|
||||||
|
return <div></div>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Settings
|
||||||
|
|
@ -112,6 +112,7 @@ button {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img,
|
||||||
|
a {
|
||||||
-webkit-user-drag: none;
|
-webkit-user-drag: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue