From 07c0a1df56e8dc28124cff2236c069de98d04dee Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Thu, 19 Jun 2025 15:50:00 -0500 Subject: [PATCH] Bug fixes --- .../SettingsButton/SettingsButton.tsx | 23 +++++++++++++++---- .../components/Shared/NoItemsFound.tsx | 4 ++-- .../components/Theming/ThemePlaylistCard.tsx | 1 + 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/pages/homepage/components/SettingsButton/SettingsButton.tsx b/src/pages/homepage/components/SettingsButton/SettingsButton.tsx index d0ac56d..80d8512 100644 --- a/src/pages/homepage/components/SettingsButton/SettingsButton.tsx +++ b/src/pages/homepage/components/SettingsButton/SettingsButton.tsx @@ -77,7 +77,7 @@ function SettingsButton() { body: selectedClient || wolClientData?.[0], }); }; - + console.log(themePlaylistData); useEffect(() => { if (appCategoryData) { const list: [any] = appCategoryData.map((category: AppCategory) => { @@ -295,14 +295,29 @@ function SettingsButton() { placeholder='Pick a playlist...' value={currentThemePlaylist} data={[ - 'All', - 'Backgrounds', - 'No Backgrounds', + { value: 'All', label: 'All' }, + { + value: 'Backgrounds', + label: 'Backgrounds', + disabled: + allThemes.filter( + (a: any) => !a.backgroundImage.toLowerCase().includes('none'), + ).length === 0, + }, + { + value: 'No Backgrounds', + label: 'No Backgrounds', + disabled: + allThemes.filter( + (a: any) => !a.backgroundImage.toLowerCase().includes('none'), + ).length !== 0, + }, ...(themePlaylistData ?.map((playlist: ThemePlaylist) => { return { value: playlist.name, label: playlist.name, + disabled: JSON.parse(playlist.themeList).length === 0, }; }) .toSorted((a: ComboboxItem, b: ComboboxItem) => diff --git a/src/pages/settings/components/Shared/NoItemsFound.tsx b/src/pages/settings/components/Shared/NoItemsFound.tsx index a83ab55..1b104cf 100644 --- a/src/pages/settings/components/Shared/NoItemsFound.tsx +++ b/src/pages/settings/components/Shared/NoItemsFound.tsx @@ -6,8 +6,8 @@ function NoItemsFound() { {hover && }