mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: 初步实现歌词界面
This commit is contained in:
parent
1eb38937fc
commit
530581ba82
15 changed files with 635 additions and 18 deletions
|
|
@ -5,6 +5,7 @@ import { Player } from '@/utils/player'
|
|||
interface Store {
|
||||
uiStates: {
|
||||
loginPhoneCountryCode: string
|
||||
showLyricPanel: boolean
|
||||
}
|
||||
settings: {
|
||||
showSidebar: boolean
|
||||
|
|
@ -14,6 +15,7 @@ interface Store {
|
|||
const initialState: Store = {
|
||||
uiStates: {
|
||||
loginPhoneCountryCode: '+86',
|
||||
showLyricPanel: false,
|
||||
},
|
||||
settings: {
|
||||
showSidebar: true,
|
||||
|
|
@ -28,6 +30,7 @@ subscribe(state, () => {
|
|||
localStorage.setItem('state', JSON.stringify(state))
|
||||
})
|
||||
|
||||
// player
|
||||
const playerInLocalStorage = localStorage.getItem('player')
|
||||
export const player = proxy(new Player())
|
||||
player.init((playerInLocalStorage && JSON.parse(playerInLocalStorage)) || {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue