[feat] Add a dynamic image option to the fullscreen player (#526)

* Add an option for a dynamic background image in the fullscreen player

* Center the background image and fix some more bugs

* More cleaning up the background image

* Add option for customizable blur amount

* Fix missing translation key for image blur

* Fix dynamic image shifting when player is opened

* Hide image blur size config if dynamic background is disabled

---------

Co-authored-by: Jeff <42182408+jeffvli@users.noreply.github.com>
This commit is contained in:
Benjamin 2024-03-05 02:30:37 -06:00 committed by GitHub
parent a45e7f24e4
commit d52d9136b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 76 additions and 8 deletions

View file

@ -6,6 +6,8 @@ import { immer } from 'zustand/middleware/immer';
interface FullScreenPlayerState {
activeTab: string | 'queue' | 'related' | 'lyrics';
dynamicBackground?: boolean;
dynamicImageBlur: number;
dynamicIsImage?: boolean;
expanded: boolean;
opacity: number;
useImageAspectRatio: boolean;
@ -28,6 +30,8 @@ export const useFullScreenPlayerStore = create<FullScreenPlayerSlice>()(
},
activeTab: 'queue',
dynamicBackground: true,
dynamicImageBlur: 1.5,
dynamicIsImage: false,
expanded: false,
opacity: 60,
useImageAspectRatio: false,