From 457704a4fe0792e78f6de5233e5b4590c112fb8c Mon Sep 17 00:00:00 2001 From: iiPython Date: Fri, 1 Mar 2024 17:45:03 -0600 Subject: [PATCH 1/7] Add an option for a dynamic background image in the fullscreen player --- src/i18n/locales/en.json | 1 + .../player/components/full-screen-player.tsx | 39 ++++++++++++++++--- .../store/full-screen-player.store.ts | 2 + 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 438e44a22..966303ede 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -311,6 +311,7 @@ "fullscreenPlayer": { "config": { "dynamicBackground": "dynamic background", + "dynamicIsImage": "enable background image", "followCurrentLyric": "follow current lyric", "lyricAlignment": "lyric alignment", "lyricGap": "lyric gap", diff --git a/src/renderer/features/player/components/full-screen-player.tsx b/src/renderer/features/player/components/full-screen-player.tsx index 970f52e42..6429daca6 100644 --- a/src/renderer/features/player/components/full-screen-player.tsx +++ b/src/renderer/features/player/components/full-screen-player.tsx @@ -68,11 +68,12 @@ const BackgroundImageOverlay = styled.div` width: 100%; height: 100%; background: var(--bg-header-overlay); + backdrop-filter: blur(1.5rem); `; const Controls = () => { const { t } = useTranslation(); - const { dynamicBackground, expanded, opacity, useImageAspectRatio } = + const { dynamicBackground, dynamicIsImage, expanded, opacity, useImageAspectRatio } = useFullScreenPlayerStore(); const { setStore } = useFullScreenPlayerStoreActions(); const { setSettings } = useSettingsStoreActions(); @@ -141,6 +142,25 @@ const Controls = () => { /> + {dynamicBackground && ( + + )} {dynamicBackground && ( )} + {dynamicIsImage && ( + + )} {dynamicBackground && ( )} - {dynamicIsImage && ( + {dynamicBackground && dynamicIsImage && (