From 03f33b925e29c7ca6ddcb5dad180408aba9bf05f Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Wed, 18 Jun 2025 17:32:48 -0500 Subject: [PATCH] Bug fixes --- .../components/Applications/Applications.tsx | 8 ++--- .../components/Bookmarks/Bookmarks.tsx | 4 +-- .../Bookmarks/DebouncedGroupSettingsItem.tsx | 6 ++-- .../components/Search/SearchProviders.tsx | 6 ++-- .../settings/components/Theming/ThemeCard.tsx | 36 ++++++++++++++----- .../settings/components/WoL/WolClients.tsx | 4 +-- 6 files changed, 41 insertions(+), 23 deletions(-) diff --git a/src/pages/settings/components/Applications/Applications.tsx b/src/pages/settings/components/Applications/Applications.tsx index 81a384b..6b266e2 100644 --- a/src/pages/settings/components/Applications/Applications.tsx +++ b/src/pages/settings/components/Applications/Applications.tsx @@ -144,7 +144,7 @@ const ApplicationSettings = () => { key={form.key('name')} {...form.getInputProps('name')} label={'Name'} - placeholder='Nextcloud' + placeholder='eg. Nextcloud' className={textInputClasses.settingsItem} w={'45%'} classNames={textInputClasses} @@ -154,7 +154,7 @@ const ApplicationSettings = () => { key={form.key('baseUrl')} {...form.getInputProps('baseUrl')} label={'Base URL'} - placeholder='/nextcloud' + placeholder='eg. /nextcloud' className={textInputClasses.settingsItem} w={'45%'} classNames={textInputClasses} @@ -165,7 +165,7 @@ const ApplicationSettings = () => { key={form.key('url')} {...form.getInputProps('url')} label={'URL'} - placeholder='https://domain.example.com/nextcloud' + placeholder='eg. https://domain.example.com/nextcloud' className={textInputClasses.settingsItem} w={'100%'} classNames={textInputClasses} @@ -214,7 +214,7 @@ const ApplicationSettings = () => { key={form.key('filter')} {...form.getInputProps('filter')} label={'Filter'} - placeholder='Storage' + placeholder='eg. Storage' className={textInputClasses.settingsItem} pt={'1rem'} w={'45%'} diff --git a/src/pages/settings/components/Bookmarks/Bookmarks.tsx b/src/pages/settings/components/Bookmarks/Bookmarks.tsx index 4baff03..9563298 100644 --- a/src/pages/settings/components/Bookmarks/Bookmarks.tsx +++ b/src/pages/settings/components/Bookmarks/Bookmarks.tsx @@ -145,7 +145,7 @@ const BookmarkSettings = () => { key={form.key('categoryName')} {...form.getInputProps('categoryName')} label={'Category Name'} - placeholder='Shopping' + placeholder='eg. Shopping' className={textInputClasses.settingsItem} classNames={textInputClasses} withAsterisk @@ -154,7 +154,7 @@ const BookmarkSettings = () => { key={form.key('filterName')} {...form.getInputProps('filterName')} label={'Filter Name'} - placeholder='Personal' + placeholder='eg. Personal' className={textInputClasses.settingsItem} classNames={textInputClasses} withAsterisk diff --git a/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx b/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx index 6c2881d..5538bdf 100644 --- a/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx +++ b/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx @@ -186,7 +186,7 @@ function DebouncedGroupSettingsItem({ label={'Delete'} > { @@ -336,7 +336,7 @@ function DebouncedGroupSettingsItem({ key={form.key('name')} {...form.getInputProps('name')} label={'Name'} - placeholder='Google' + placeholder='eg. Google' labelProps={{ style: { color: 'var(--mantine-color-primary-0)', @@ -368,7 +368,7 @@ function DebouncedGroupSettingsItem({ key={form.key('url')} {...form.getInputProps('url')} label={'URL'} - placeholder='https://google.com' + placeholder='eg. https://google.com' labelProps={{ style: { color: 'var(--mantine-color-primary-0)', diff --git a/src/pages/settings/components/Search/SearchProviders.tsx b/src/pages/settings/components/Search/SearchProviders.tsx index 523a043..c1c7bc0 100644 --- a/src/pages/settings/components/Search/SearchProviders.tsx +++ b/src/pages/settings/components/Search/SearchProviders.tsx @@ -95,7 +95,7 @@ const SearchProviderSettings = () => { key={form.key('name')} {...form.getInputProps('name')} label={'Name'} - placeholder='Google' + placeholder='eg. Google' className={textInputClasses.settingsItem} classNames={textInputClasses} withAsterisk @@ -104,7 +104,7 @@ const SearchProviderSettings = () => { key={form.key('prefix')} {...form.getInputProps('prefix')} label={'Prefix'} - placeholder='/g' + placeholder='eg. /g' className={textInputClasses.settingsItem} classNames={textInputClasses} withAsterisk @@ -114,7 +114,7 @@ const SearchProviderSettings = () => { key={form.key('url')} {...form.getInputProps('url')} label={'Url'} - placeholder='https://www.google.com/search?q=' + placeholder='eg. https://www.google.com/search?q=' className={textInputClasses.settingsItem} w={'64%'} classNames={textInputClasses} diff --git a/src/pages/settings/components/Theming/ThemeCard.tsx b/src/pages/settings/components/Theming/ThemeCard.tsx index eddcba3..2c59d7c 100644 --- a/src/pages/settings/components/Theming/ThemeCard.tsx +++ b/src/pages/settings/components/Theming/ThemeCard.tsx @@ -231,15 +231,33 @@ function ThemeCard({ setShiftShuffle(0); }} onClick={() => { - const themeList = JSON.parse( - themePlaylists?.find( - (t: ThemePlaylist) => t?.name === currentThemePlaylist, - )?.themeList ?? '[]', - ); - const filteredThemes = allThemes.filter((t: Theme) => - themeList.includes(t.id), - ); - handleThemeChange(filteredThemes, false); + if (currentThemePlaylist === 'All') { + handleThemeChange(allThemes, false); + } else if (currentThemePlaylist === 'Backgrounds') { + handleThemeChange( + allThemes.filter( + (a: any) => !a.backgroundImage.toLowerCase().includes('none'), + ), + false, + ); + } else if (currentThemePlaylist === 'No Backgrounds') { + handleThemeChange( + allThemes.filter((a: any) => + a.backgroundImage.toLowerCase().includes('none'), + ), + false, + ); + } else { + const themeList = JSON.parse( + themePlaylists?.find( + (t: ThemePlaylist) => t?.name === currentThemePlaylist, + )?.themeList ?? '[]', + ); + const filteredThemes = allThemes.filter((t: Theme) => + themeList.includes(t.id), + ); + handleThemeChange(filteredThemes, false); + } }} gap={0} style={{ diff --git a/src/pages/settings/components/WoL/WolClients.tsx b/src/pages/settings/components/WoL/WolClients.tsx index c79ad11..9b8e9ec 100644 --- a/src/pages/settings/components/WoL/WolClients.tsx +++ b/src/pages/settings/components/WoL/WolClients.tsx @@ -90,7 +90,7 @@ const WolClientSettings = () => { key={form.key('hostname')} {...form.getInputProps('hostname')} label={'Hostname'} - placeholder='Workstation' + placeholder='eg. Workstation' className={textInputClasses.settingsItem} classNames={textInputClasses} withAsterisk @@ -99,7 +99,7 @@ const WolClientSettings = () => { key={form.key('macAddress')} {...form.getInputProps('macAddress')} label={'MAC Address'} - placeholder='00:00:00:00:00:00' + placeholder='eg. 00:00:00:00:00:00' className={textInputClasses.settingsItem} classNames={textInputClasses} withAsterisk