From d098753ac6d1a82e8319f98785721b48256b5e50 Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Thu, 3 Apr 2025 15:42:16 -0500 Subject: [PATCH] Style changes --- src/pages/settings/Settings.tsx | 6 +- .../components/Applications/Applications.tsx | 16 +- .../components/Bookmarks/Bookmarks.tsx | 16 +- .../Bookmarks/DebouncedGroupSettingsItem.tsx | 2 + .../settings/components/Messages/Messages.tsx | 7 +- .../components/Search/SearchProviders.tsx | 9 +- .../components/Shared/SettingsHeader.tsx | 12 +- .../components/Theming/ThemePlaylists.tsx | 10 +- .../settings/components/Theming/Themes.tsx | 175 +++++++++--------- .../settings/components/WoL/WolClients.tsx | 9 +- src/styles/Tabs.module.css | 2 +- src/styles/Text.module.css | 8 +- 12 files changed, 163 insertions(+), 109 deletions(-) diff --git a/src/pages/settings/Settings.tsx b/src/pages/settings/Settings.tsx index cacf059..9c205a1 100644 --- a/src/pages/settings/Settings.tsx +++ b/src/pages/settings/Settings.tsx @@ -26,8 +26,8 @@ export function Settings() { const navigate = useNavigate(); const { tabValue } = useParams(); return ( - - + + navigate(`/${import.meta.env.VITE_BASE_URL}/settings/${value}`) } diff --git a/src/pages/settings/components/Applications/Applications.tsx b/src/pages/settings/components/Applications/Applications.tsx index 70bebf2..271c251 100644 --- a/src/pages/settings/components/Applications/Applications.tsx +++ b/src/pages/settings/components/Applications/Applications.tsx @@ -240,7 +240,12 @@ const ApplicationSettings = () => { /> {dragging ? ( - + {(provided) => ( { ) : ( - + {applicationData?.map((application: Application) => ( @@ -340,7 +350,7 @@ const ApplicationSettings = () => { /> - + { /> {dragging ? ( - + {(provided) => ( { ) : ( - - + + {groups?.map((group: BookmarkGroup) => ( { } /> - + {messages?.map((message: Message) => ( diff --git a/src/pages/settings/components/Search/SearchProviders.tsx b/src/pages/settings/components/Search/SearchProviders.tsx index afec0e7..510037c 100644 --- a/src/pages/settings/components/Search/SearchProviders.tsx +++ b/src/pages/settings/components/Search/SearchProviders.tsx @@ -148,7 +148,12 @@ const SearchProviderSettings = () => { searchValue={searchValue} setSearchValue={setSearchValue} /> - + {providerData?.map((provider: Provider) => ( @@ -167,7 +172,7 @@ const SearchProviderSettings = () => { - + - + {title} @@ -51,7 +55,7 @@ function SettingsHeader({ style={{ color: theme.primaryColor, backgroundColor: theme.backgroundColor, - width: '500px', + width: isMobile ? '95%' : '500px', }} > @@ -108,7 +112,7 @@ function SettingsHeader({ labelPosition='left' pos={'absolute'} right={isMobile ? '2rem' : '1rem'} - top={isMobile ? '10rem' : undefined} + top={isMobile ? '3.5rem' : undefined} onChange={(e) => { setDragging(e.target.checked); }} diff --git a/src/pages/settings/components/Theming/ThemePlaylists.tsx b/src/pages/settings/components/Theming/ThemePlaylists.tsx index 4284369..8e552b6 100644 --- a/src/pages/settings/components/Theming/ThemePlaylists.tsx +++ b/src/pages/settings/components/Theming/ThemePlaylists.tsx @@ -21,7 +21,8 @@ function ThemePlaylists() { const { mutateAsync } = useMutationAPI(); const [opened, { open, close }] = useDisclosure(false); const [selectedPlaylist, setSelectedPlaylist] = useState({}); - const { currentThemePlaylist, setCurrentThemePlaylist, theme } = useCommonHooks(); + const { currentThemePlaylist, setCurrentThemePlaylist, theme, isMobile } = + useCommonHooks(); const [searchValue, setSearchValue] = useState(''); const [debouncedSearch] = useDebouncedValue(searchValue, 500); @@ -118,7 +119,12 @@ function ThemePlaylists() { User Made - + {themePlaylists ?.filter((playlist: ThemePlaylist) => playlist.default === 0) ?.filter((a: ThemePlaylist) => diff --git a/src/pages/settings/components/Theming/Themes.tsx b/src/pages/settings/components/Theming/Themes.tsx index 247b1ea..4bd259e 100644 --- a/src/pages/settings/components/Theming/Themes.tsx +++ b/src/pages/settings/components/Theming/Themes.tsx @@ -58,7 +58,7 @@ function ThemesSettings() { } }, [backgroundData, isBackgroundFetched]); return ( - + - - - - ) : ( - Random Theme - ) - } - labelPosition='left' - pos={'absolute'} - right={isMobile ? '2rem' : '1rem'} - top={isMobile ? '9.5rem' : '2rem'} - checked={currentTheme === 'random'} - onChange={(e) => { - setCurrentTheme(e.target.checked ? 'random' : theme.name); - setCurrentThemePlaylist('All'); - }} - color={theme.primaryColor} + + + ) : ( + Random Theme + ) + } + labelPosition='left' + pos={'absolute'} + right={isMobile ? '2rem' : '1rem'} + top={isMobile ? '3.5rem' : '2rem'} + checked={currentTheme === 'random'} + onChange={(e) => { + setCurrentTheme(e.target.checked ? 'random' : theme.name); + setCurrentThemePlaylist('All'); + }} + color={theme.primaryColor} + style={{ + zIndex: 100, + }} + /> + + - - - {allThemes - ?.filter((a: Theme) => - a.name.toLowerCase().includes(debouncedSearch.toLowerCase()), - ) - .map((cardTheme: Theme) => ( - - {cardTheme.name === currentTheme && ( - - )} - + a.name.toLowerCase().includes(debouncedSearch.toLowerCase()), + ) + .map((cardTheme: Theme) => ( + + {cardTheme.name === currentTheme && ( + - - - - ))} - - + /> + )} + + + + + ))} + ); } diff --git a/src/pages/settings/components/WoL/WolClients.tsx b/src/pages/settings/components/WoL/WolClients.tsx index 65d8b33..4b7f86e 100644 --- a/src/pages/settings/components/WoL/WolClients.tsx +++ b/src/pages/settings/components/WoL/WolClients.tsx @@ -131,7 +131,12 @@ const WolClientSettings = () => { searchValue={searchValue} setSearchValue={setSearchValue} /> - + {wolClients?.map((client: WolClient) => ( @@ -151,7 +156,7 @@ const WolClientSettings = () => { - + diff --git a/src/styles/Tabs.module.css b/src/styles/Tabs.module.css index 164e8b3..cc89b30 100644 --- a/src/styles/Tabs.module.css +++ b/src/styles/Tabs.module.css @@ -2,6 +2,7 @@ @media (max-width: 600px) { .panel { padding-left: 0 !important; + height: 100%; } } .panel { @@ -22,7 +23,6 @@ border-top: solid 2px var(--color-text-acc); padding-left: 2rem; padding-top: 2rem; - height: 100%; } .list::before { border-color: var(--color-text-acc); diff --git a/src/styles/Text.module.css b/src/styles/Text.module.css index 2ff2a50..97a0db1 100644 --- a/src/styles/Text.module.css +++ b/src/styles/Text.module.css @@ -98,8 +98,12 @@ &.root { font-size: 32px; font-weight: bold; - padding-top: 1.5rem; - color: var(--color-text-pri); + margin-top: 1.5rem; + color: var(--color-text-acc); + background-color: var(--color-search-background); + border-radius: 12px; + padding-left: 12px; + padding-right: 12px; } }