Add fullscreen player view (#27)

* Add store controls for fullscreen player

* Normalize styles for playback config

* Add fullscreen player component

* Add option component

* Update player controls to use option/popover components

* Add esc hotkey to close player

* Add usePlayerData hook
This commit is contained in:
Jeff 2023-03-28 14:19:23 -07:00 committed by GitHub
parent 6cfdb8ff84
commit e47fcfc62e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 780 additions and 62 deletions

View file

@ -892,6 +892,12 @@ export const useDefaultQueue = () => usePlayerStore((state) => state.queue.defau
export const useCurrentSong = () => usePlayerStore((state) => state.current.song);
export const usePlayerData = () =>
usePlayerStore(
(state) => state.actions.getPlayerData(),
(a, b) => a.current.nextIndex === b.current.nextIndex,
);
export const useCurrentPlayer = () => usePlayerStore((state) => state.current.player);
export const useCurrentStatus = () => usePlayerStore((state) => state.current.status);