From 29514d329046e274004a0ee19e982c10a43ab7f6 Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Thu, 12 Jun 2025 16:33:42 -0500 Subject: [PATCH] Style uniformity --- src/components/HelpModal/HelpModal.tsx | 2 +- src/components/HelpModal/HelpSection.tsx | 8 +- src/components/HelpModal/HintItem.tsx | 6 +- .../WeatherModal/CurrentWeather.tsx | 6 +- .../WeatherModal/ExtendedForecastCard.tsx | 5 +- src/components/WeatherModal/WeatherGraphs.tsx | 2 +- src/components/WeatherModal/WeatherModal.tsx | 4 +- .../components/Applications/AppItem.tsx | 8 +- .../components/Bookmarks/BookmarkGroups.tsx | 2 +- .../components/Bookmarks/BookmarkItem.tsx | 5 - .../homepage/components/Header/Header.tsx | 6 +- .../components/Header/LargeHeader.tsx | 6 +- .../homepage/components/Search/Search.tsx | 190 +++++++----------- .../SettingsButton/SettingsButton.tsx | 36 ++-- .../Applications/AppSettingsItem.tsx | 12 +- .../components/Applications/Applications.tsx | 7 +- .../Applications/DebouncedApplication.tsx | 18 +- .../Bookmarks/BookmarkSettingsItem.tsx | 2 +- .../components/Bookmarks/Bookmarks.tsx | 14 +- .../Bookmarks/DebouncedBookmarkItem.tsx | 13 +- .../Bookmarks/DebouncedGroupSettingsItem.tsx | 22 +- .../components/Messages/DebouncedMessage.tsx | 9 +- .../Personalization/Personalization.tsx | 2 +- .../Search/DebouncedSearchProvider.tsx | 11 +- .../components/Search/SearchProviders.tsx | 3 - .../settings/components/Theming/ThemeCard.tsx | 42 ++-- .../components/Theming/ThemeMiniCard.tsx | 2 +- .../components/Theming/ThemeModal.tsx | 14 +- .../components/Theming/ThemeModalContent.tsx | 52 ++--- .../components/Theming/ThemePlaylistCard.tsx | 32 +-- .../components/Theming/ThemePlaylistModal.tsx | 2 +- .../components/Theming/ThemePlaylists.tsx | 10 +- .../components/Theming/ThemeSelect.tsx | 4 +- .../settings/components/Theming/Themes.tsx | 8 +- .../components/WoL/DebouncedWolClient.tsx | 10 +- .../components/WoL/WolClientSettingsItem.tsx | 4 +- .../settings/components/WoL/WolClients.tsx | 2 - src/styles/ActionIcon.module.css | 12 +- src/styles/Box.module.css | 2 +- src/styles/Button.module.css | 16 +- src/styles/Modal.module.css | 2 +- src/styles/MultiSelect.module.css | 6 +- src/styles/Select.module.css | 20 +- src/styles/Stack.module.css | 2 +- src/styles/Switch.module.css | 2 +- src/styles/Text.module.css | 45 +++-- src/styles/TextInput.module.css | 5 +- 47 files changed, 316 insertions(+), 377 deletions(-) diff --git a/src/components/HelpModal/HelpModal.tsx b/src/components/HelpModal/HelpModal.tsx index 7868ecf..c8c3925 100644 --- a/src/components/HelpModal/HelpModal.tsx +++ b/src/components/HelpModal/HelpModal.tsx @@ -56,7 +56,7 @@ export function HelpModal({ }; })} /> - + { diff --git a/src/components/HelpModal/HelpSection.tsx b/src/components/HelpModal/HelpSection.tsx index 3b5add7..db23f3a 100644 --- a/src/components/HelpModal/HelpSection.tsx +++ b/src/components/HelpModal/HelpSection.tsx @@ -8,9 +8,9 @@ function HelpSection({ name, items }: { name: string; items: SearchShortcut[] })

{name}

- + diff --git a/src/components/HelpModal/HintItem.tsx b/src/components/HelpModal/HintItem.tsx index 2604e8c..831b761 100644 --- a/src/components/HelpModal/HintItem.tsx +++ b/src/components/HelpModal/HintItem.tsx @@ -8,7 +8,7 @@ function HintItem({ command, name }: { command: string; name: string }) { justify='center' style={{ display: 'flex', - padding: '8px', + padding: '.5rem', borderRadius: '10px', backgroundColor: 'var(--mantine-color-background-0)', }} @@ -17,7 +17,7 @@ function HintItem({ command, name }: { command: string; name: string }) { style={{ color: 'var(--mantine-color-background-0)', backgroundColor: 'var(--mantine-color-primary-0)', - padding: '8px', + padding: '.5rem', borderTopLeftRadius: '10px', borderBottomLeftRadius: '10px', }} @@ -28,7 +28,7 @@ function HintItem({ command, name }: { command: string; name: string }) { style={{ color: 'var(--mantine-color-background-0)', backgroundColor: 'var(--mantine-color-accent-0)', - padding: '8px', + padding: '.5rem', borderTopRightRadius: '10px', borderBottomRightRadius: '10px', }} diff --git a/src/components/WeatherModal/CurrentWeather.tsx b/src/components/WeatherModal/CurrentWeather.tsx index 1f55135..e29cb87 100644 --- a/src/components/WeatherModal/CurrentWeather.tsx +++ b/src/components/WeatherModal/CurrentWeather.tsx @@ -48,7 +48,7 @@ export default function CurrentWeather({ current }: { current: CW }) { {current.temperature === 69 ? 'Nice' : current.textDescription} diff --git a/src/components/WeatherModal/ExtendedForecastCard.tsx b/src/components/WeatherModal/ExtendedForecastCard.tsx index bc97814..a832aeb 100644 --- a/src/components/WeatherModal/ExtendedForecastCard.tsx +++ b/src/components/WeatherModal/ExtendedForecastCard.tsx @@ -22,7 +22,10 @@ export default function ExtendedForecastCard({ paddingBottom: '.5rem', }} > - + diff --git a/src/components/WeatherModal/WeatherModal.tsx b/src/components/WeatherModal/WeatherModal.tsx index 339beb6..2d9df1c 100644 --- a/src/components/WeatherModal/WeatherModal.tsx +++ b/src/components/WeatherModal/WeatherModal.tsx @@ -65,10 +65,10 @@ export function WeatherModal({ gap={8} style={{ borderBottom: '1px solid var(--mantine-color-border-0)' }} > - + Weather Forecast for{' '} - + {currentUser.physicalAddress} diff --git a/src/pages/homepage/components/Applications/AppItem.tsx b/src/pages/homepage/components/Applications/AppItem.tsx index 3a37d09..7fe55a7 100644 --- a/src/pages/homepage/components/Applications/AppItem.tsx +++ b/src/pages/homepage/components/Applications/AppItem.tsx @@ -44,12 +44,12 @@ function AppItem({ url, icon, name }: { url: string; icon: string; name: string style={{ height: '64px', width: isMobile ? '100%' : undefined, - marginRight: isMobile ? '0' : '1em', - marginLeft: isMobile ? '0' : '1em', - paddingTop: isMobile ? '0' : '15px', + marginRight: isMobile ? 0 : '1rem', + marginLeft: isMobile ? 0 : '1rem', + paddingTop: isMobile ? 0 : '1rem', }} > - {Icon && } + {Icon && } {bookmark.name} diff --git a/src/pages/homepage/components/Header/Header.tsx b/src/pages/homepage/components/Header/Header.tsx index f9efc7b..b0d2bc2 100644 --- a/src/pages/homepage/components/Header/Header.tsx +++ b/src/pages/homepage/components/Header/Header.tsx @@ -138,15 +138,15 @@ function Header({ component='h2' className={textClasses.dateTime} classNames={textClasses} - mr={4} + mr={'.25rem'} > {current.temperature}°F {current.highTemp}°F/{current.lowTemp}°F diff --git a/src/pages/homepage/components/Header/LargeHeader.tsx b/src/pages/homepage/components/Header/LargeHeader.tsx index 191389d..542a982 100644 --- a/src/pages/homepage/components/Header/LargeHeader.tsx +++ b/src/pages/homepage/components/Header/LargeHeader.tsx @@ -70,7 +70,7 @@ function LargeHeader({ {greet .replace('$firstName', currentUser.firstName) @@ -79,7 +79,7 @@ function LargeHeader({ .replace('$^lastName', currentUser.lastName.toUpperCase())} { - open(`https://${item.option.url}`, '_self'); - }; - const handleKeyPress = (item: any) => { let option = ''; let subtext = ''; @@ -278,115 +274,23 @@ export default function Search({ function RenderOption(item: any) { const [showFillButton, setShowFillButton] = useState(false); - if (item.option.searchTerm !== undefined) { - const m = new Date(item.option.dateTimeStamp); - const year = `${m.getUTCFullYear()}`.slice(-2); - const month = `0${m.getUTCMonth() + 1}`.slice(-2); - const day = `0${m.getUTCDate()}`.slice(-2); - const hours = `0${m.getUTCHours()}`.slice(-2); - const minutes = `0${m.getUTCMinutes()}`.slice(-2); - const dateString = isMobile - ? `${month}/${day}/${year}` - : `${month}/${day}/${year} ${hours}:${minutes}`; - return ( - { - handleSearchHistoryItem(item); - }} - onMouseEnter={() => { - setShowFillButton(true); - }} - onMouseLeave={() => { - setShowFillButton(false); - }} - > - - - {item.option.provider} - - {showFillButton && ( - { - e.stopPropagation(); - setSearchValue(`${item.option.prefix} ${item.option.searchTerm}`); - }} - > - - - )} - - - - {item.option.searchTerm} - - - {dateString} - - - - {showFillButton && ( - { - e.stopPropagation(); - mutateAsync({ - method: 'DELETE', - endpoint: searchEndpoint, - body: { id: item.option.id }, - }); - }} - > - - - )} - - - ); - } + const m = new Date(item.option.dateTimeStamp); + const year = `${m.getUTCFullYear()}`.slice(-2); + const month = `0${m.getUTCMonth() + 1}`.slice(-2); + const day = `0${m.getUTCDate()}`.slice(-2); + const hours = `0${m.getUTCHours()}`.slice(-2); + const minutes = `0${m.getUTCMinutes()}`.slice(-2); + const dateString = isMobile + ? `${month}/${day}/${year}` + : `${month}/${day}/${year} ${hours}:${minutes}`; return ( { - handleAppSearchItem(item); + handleSearchHistoryItem(item); }} onMouseEnter={() => { setShowFillButton(true); @@ -395,28 +299,81 @@ export default function Search({ setShowFillButton(false); }} > - + - {item.option.label} + {item.option.provider} + {showFillButton && ( + { + e.stopPropagation(); + setSearchValue(`${item.option.prefix} ${item.option.searchTerm}`); + }} + > + + + )} - - {item.option.searchTerm} + + {item.option.searchTerm} + + - {item.option.value} + {dateString} + + {showFillButton && ( + { + e.stopPropagation(); + mutateAsync({ + method: 'DELETE', + endpoint: searchEndpoint, + body: { id: item.option.id }, + }); + }} + > + + + )} + ); } @@ -465,6 +422,7 @@ export default function Search({ .slice(0, 10); setFilteredHistory(filtered); }, [searchValue]); + return ( - + Currently:{' '} {theme.name} - + Playlist:{' '}