diff --git a/package-lock.json b/package-lock.json index ae7e1b1..8cf2c95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@types/node": "^24.10.0", - "@types/react": "^19.2.2", + "@types/react": "^19.2.3", "@types/react-dom": "^19.2.2", "@vitejs/plugin-react": "^5.1.0", "@vitest/coverage-v8": "^4.0.8", @@ -1868,9 +1868,9 @@ } }, "node_modules/@types/react": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", - "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.3.tgz", + "integrity": "sha512-k5dJVszUiNr1DSe8Cs+knKR6IrqhqdhpUwzqhkS8ecQTSf3THNtbfIp/umqHMpX2bv+9dkx3fwDv/86LcSfvSg==", "devOptional": true, "license": "MIT", "peer": true, diff --git a/package.json b/package.json index 2abb3df..0b6f153 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/node": "^24.10.0", - "@types/react": "^19.2.2", + "@types/react": "^19.2.3", "@types/react-dom": "^19.2.2", "@vitejs/plugin-react": "^5.1.0", "@vitest/coverage-v8": "^4.0.8", diff --git a/src/components/Applications/AppItem.tsx b/src/components/Applications/AppItem.tsx index 1de93de..81f23f2 100644 --- a/src/components/Applications/AppItem.tsx +++ b/src/components/Applications/AppItem.tsx @@ -29,7 +29,7 @@ export function AppItem({ const { ref, width, height } = useElementSize(); const allIcons: any = { ...fa6, ...vsc, ...si }; const Icon = allIcons[icon]; - const { isMobile, filter } = useCommonHooks(); + const { isMobile, iconFilter } = useCommonHooks(); const [textDecoration, setTextDecoration] = useState('none'); const [hover, setHover] = useState(false); const validUrl = @@ -102,7 +102,7 @@ export function AppItem({ style={{ height: scale * 32, width: scale * 32, - filter: filter(selectedTheme), + filter: iconFilter(selectedTheme), }} /> )} diff --git a/src/components/DataTable/DataTable.tsx b/src/components/DataTable/DataTable.tsx index 1d7bf4d..8dec631 100644 --- a/src/components/DataTable/DataTable.tsx +++ b/src/components/DataTable/DataTable.tsx @@ -22,6 +22,7 @@ export function DataTable({ filtersEnabled, globalFilter, setGlobalFilter, + isRefreshing, }: { data: any[]; columns: any[]; @@ -30,6 +31,7 @@ export function DataTable({ filtersEnabled: boolean; globalFilter: string; setGlobalFilter: Dispatch>; + isRefreshing?: boolean; }) { const [columnFilters, setColumnFilters] = useState([]); const table = useReactTable({ @@ -192,7 +194,11 @@ export function DataTable({ ))} - + {table.getFooterGroups().map((footerGroup) => ( {footerGroup.headers.map((header) => ( @@ -223,6 +229,29 @@ export function DataTable({ + + + + Updating + + + diff --git a/src/hooks/useCommonHooks.ts b/src/hooks/useCommonHooks.ts index ac585ed..245f947 100644 --- a/src/hooks/useCommonHooks.ts +++ b/src/hooks/useCommonHooks.ts @@ -7,7 +7,7 @@ import { useMutationAPI } from './useAPI'; export function useCommonHooks() { const { mutateAsync } = useMutationAPI(); - const isMobile = window.matchMedia('(max-width: 600px)').matches; + const isMobile = globalThis.matchMedia('(max-width: 600px)').matches; const [theme, setTheme] = useAtom(appTheme); const [themeName, setThemeName] = useLocalStorage({ key: 'theme', @@ -109,12 +109,12 @@ export function useCommonHooks() { }); const urlPattern = new RegExp( - '^(https?:\\/\\/)?' + // protocol - '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name - '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address - '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path - '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string - '(\\#[-a-z\\d_]*)?$', + String.raw`^(https?:\/\/)?` + + String.raw`((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|` + + String.raw`((\d{1,3}\.){3}\d{1,3}))` + + String.raw`(\:\d+)?(\/[-a-z\d%_.~+]*)*` + + String.raw`(\?[;&a-z\d%_.~+=-]*)?` + + String.raw`(\#[-a-z\d_]*)?$`, 'i', ); @@ -152,8 +152,8 @@ export function useCommonHooks() { mutateAsync({ method: 'DELETE', endpoint: endpoint, body: item }); }; - const filter = (selectedTheme?: Theme) => { - if (selectedTheme && selectedTheme.appShadowsEnabled === 1) { + const iconFilter = (selectedTheme?: Theme) => { + if (selectedTheme?.appShadowsEnabled === 1) { return 'drop-shadow(2px 2px color-mix(in srgb, var(--mantine-color-accent-0), transparent 30%))'; } if (!selectedTheme && theme.appShadowsEnabled === 1) { @@ -163,14 +163,14 @@ export function useCommonHooks() { return 'none'; }; - function fixDigits(k: number) { + const fixDigits = (k: number) => { if (k < 10) { return `0${k}`; } return k; - } + }; - function getObjectDiff(original: any, current: any) { + const getObjectDiff = (original: any, current: any) => { const changes: any = {}; // Check current object's properties @@ -210,14 +210,14 @@ export function useCommonHooks() { } return Object.keys(changes).length === 0 ? null : changes; - } + }; return { isMobile, theme, setTheme, urlPattern, - filter, + iconFilter, fixDigits, reorder, getObjectDiff, diff --git a/src/pages/homepage/components/SettingsButton/SettingsCard.tsx b/src/pages/homepage/components/SettingsButton/SettingsCard.tsx index bb199bc..38e4f4d 100644 --- a/src/pages/homepage/components/SettingsButton/SettingsCard.tsx +++ b/src/pages/homepage/components/SettingsButton/SettingsCard.tsx @@ -61,7 +61,7 @@ function SettingsCard({ {sectionTitle} - + Density diff --git a/src/pages/homepage/components/SettingsButton/ThemingCard.tsx b/src/pages/homepage/components/SettingsButton/ThemingCard.tsx index aae01cb..2ff535d 100644 --- a/src/pages/homepage/components/SettingsButton/ThemingCard.tsx +++ b/src/pages/homepage/components/SettingsButton/ThemingCard.tsx @@ -58,11 +58,11 @@ function ThemingCard() { }); useEffect(() => { - if (theme.name !== current) { - start(); - } else { + if (theme.name === current) { setCurrent(theme.name); stop(); + } else { + start(); } }, [theme]); @@ -215,9 +215,7 @@ function ThemingCard() { } onChange={(_value, option: ComboboxItem) => { setCurrentThemePlaylist(option.value); - if (option.value !== 'Time of Day') { - setThemeName('random'); - } else { + if (option.value === 'Time of Day') { const themeList = JSON.parse( themePlaylistData.find((t: ThemePlaylist) => t.name === 'Time of Day') .themeList, @@ -228,6 +226,8 @@ function ThemingCard() { t.id === Number(themeList[Math.floor(new Date().getHours() / 6)]), ).name, ); + } else { + setThemeName('random'); } }} /> diff --git a/src/pages/settings/components/Applications/Applications.tsx b/src/pages/settings/components/Applications/Applications.tsx index 3b4b603..2af02af 100644 --- a/src/pages/settings/components/Applications/Applications.tsx +++ b/src/pages/settings/components/Applications/Applications.tsx @@ -7,6 +7,7 @@ import { Grid, GridCol, Group, + LoadingOverlay, Popover, Select, Stack, @@ -48,7 +49,11 @@ const ApplicationSettings = () => { }); const appsEndpoint = 'api/applications'; const appsOrderEndpoint = 'api/applicationOrder'; - const { data: applicationData, isFetching: isAppsFetching } = useQueryAPI({ + const { + data: applicationData, + isFetched: applicationDataIsFetched, + isFetching: applicationDataIsFetching, + } = useQueryAPI({ endpoint: appsEndpoint, }); const [applications, setApplications] = useState([]); @@ -88,7 +93,7 @@ const ApplicationSettings = () => { form.reset(); }; useEffect(() => { - if (applicationData && !isAppsFetching) { + if (applicationData && applicationDataIsFetched) { setApplications( applicationData .filter( @@ -103,7 +108,7 @@ const ApplicationSettings = () => { if (debouncedSearch === searchValue) { setIsLoading(false); } - }, [applicationData, isAppsFetching, debouncedSearch]); + }, [applicationData, applicationDataIsFetched, debouncedSearch]); useEffect(() => { if (applicationList.length > 0 && applicationList !== applications) { @@ -305,6 +310,16 @@ const ApplicationSettings = () => { mb={isMobile ? '6rem' : '1rem'} align='center' > + {applications.length > 0 ? ( {(provided) => ( diff --git a/src/pages/settings/components/Bookmarks/Bookmarks.tsx b/src/pages/settings/components/Bookmarks/Bookmarks.tsx index ea4f2a8..ef4cbe8 100644 --- a/src/pages/settings/components/Bookmarks/Bookmarks.tsx +++ b/src/pages/settings/components/Bookmarks/Bookmarks.tsx @@ -1,5 +1,14 @@ import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd'; -import { Box, Button, Card, Group, Stack, Text, TextInput } from '@mantine/core'; +import { + Box, + Button, + Card, + Group, + LoadingOverlay, + Stack, + Text, + TextInput, +} from '@mantine/core'; import { isNotEmpty, useForm } from '@mantine/form'; import { useDebouncedValue, useDisclosure } from '@mantine/hooks'; import { AddItemModal, NoItemsFound, SettingsHeader } from 'components'; @@ -24,7 +33,11 @@ const BookmarkSettings = () => { }, }); const bookmarksEndpoint = 'api/bookmarks'; - const { data: bookmarkData, isFetched: bookmarksIsFetched } = useQueryAPI({ + const { + data: bookmarkData, + isFetched: bookmarkDataIsFetched, + isFetching: bookmarkDataIsFetching, + } = useQueryAPI({ endpoint: bookmarksEndpoint, }); const [bookmarks, setBookmarks] = useState([]); @@ -68,10 +81,10 @@ const BookmarkSettings = () => { } useEffect(() => { - if (bookmarkData && bookmarksIsFetched) { + if (bookmarkData && bookmarkDataIsFetched) { setBookmarks(bookmarkData); } - }, [bookmarksIsFetched, bookmarkData]); + }, [bookmarkDataIsFetched, bookmarkData]); useEffect(() => { if (groupData && groupsIsFetched) { @@ -83,12 +96,11 @@ const BookmarkSettings = () => { a.name.toLowerCase().includes(debouncedGroupSearch.toLowerCase()) || a.url.toLowerCase().includes(debouncedGroupSearch.toLowerCase()), ) - .map( - (a: Bookmark) => - groupData.filter( - (b: BookmarkGroup) => - b.categoryName.toLowerCase() === a.category.toLowerCase(), - )[0], + .map((a: Bookmark) => + groupData.find( + (b: BookmarkGroup) => + b.categoryName.toLowerCase() === a.category.toLowerCase(), + ), ), ), ]; @@ -300,6 +312,16 @@ const BookmarkSettings = () => { mb={isMobile ? '6rem' : '1rem'} align='center' > + {groups.length > 0 ? ( groups?.map((group: BookmarkGroup) => ( diff --git a/src/pages/settings/components/Messages/Messages.tsx b/src/pages/settings/components/Messages/Messages.tsx index 36c8c32..d4b8e69 100644 --- a/src/pages/settings/components/Messages/Messages.tsx +++ b/src/pages/settings/components/Messages/Messages.tsx @@ -1,4 +1,12 @@ -import { Button, Grid, GridCol, Group, Stack, TextInput } from '@mantine/core'; +import { + Button, + Grid, + GridCol, + Group, + LoadingOverlay, + Stack, + TextInput, +} from '@mantine/core'; import { isNotEmpty, useForm } from '@mantine/form'; import { useDebouncedValue, useDisclosure } from '@mantine/hooks'; import { AddItemModal, NoItemsFound, SettingsHeader } from 'components'; @@ -10,7 +18,11 @@ import DebouncedMessage from './DebouncedMessage'; const MessageSettings = () => { const endpoint = 'api/messages'; - const { data: messageData, isFetched: isMessagesFetched } = useQueryAPI({ + const { + data: messageData, + isFetched: messageDataIsFetched, + isFetching: messageDataIsFetching, + } = useQueryAPI({ endpoint: endpoint, }); const form = useForm({ @@ -37,7 +49,7 @@ const MessageSettings = () => { }; useEffect(() => { - if (messageData && isMessagesFetched) { + if (messageData && messageDataIsFetched) { setMessages( messageData.filter((m: Message) => m.message.toLowerCase().includes(debouncedSearch.toLowerCase()), @@ -47,7 +59,7 @@ const MessageSettings = () => { if (debouncedSearch === searchValue) { setIsLoading(false); } - }, [messageData, isMessagesFetched, debouncedSearch]); + }, [messageData, messageDataIsFetched, debouncedSearch]); useEffect(() => { if (Object.keys(debounced).length) { @@ -133,7 +145,18 @@ const MessageSettings = () => { mt={isMobile ? '10rem' : '6rem'} mb={isMobile ? '6rem' : undefined} align='center' + pos={'relative'} > + {messages.length > 0 ? ( messages?.map((message: Message) => ( diff --git a/src/pages/settings/components/Personalization/Personalization.tsx b/src/pages/settings/components/Personalization/Personalization.tsx index b458c5e..ed8a2f3 100644 --- a/src/pages/settings/components/Personalization/Personalization.tsx +++ b/src/pages/settings/components/Personalization/Personalization.tsx @@ -1,4 +1,4 @@ -import { Card, Grid, GridCol, Overlay, Stack, TextInput } from '@mantine/core'; +import { Card, Grid, GridCol, LoadingOverlay, Stack, TextInput } from '@mantine/core'; import { useDebouncedValue } from '@mantine/hooks'; import { SettingsHeader } from 'components'; import { useCommonHooks, useMutationAPI, useQueryAPI } from 'hooks'; @@ -10,8 +10,8 @@ const PersonalizationSettings = () => { const endpoint = 'api/personalData'; const { data: personalData, - isFetched: personalIsFetched, - isFetching: personalIsFetching, + isFetched: personalDataIsFetched, + isFetching: personalDataIsFetching, } = useQueryAPI({ endpoint: endpoint, }); @@ -22,10 +22,10 @@ const PersonalizationSettings = () => { const { isMobile, theme } = useCommonHooks(); useEffect(() => { - if (personalData && personalIsFetched) { + if (personalData && personalDataIsFetched) { setPersonal(personalData[0]); } - }, [personalData, personalIsFetched]); + }, [personalData, personalDataIsFetched]); useEffect(() => { if (Object.keys(debounced).length) { @@ -66,17 +66,18 @@ const PersonalizationSettings = () => { isLoading={false} setIsLoading={() => {}} /> - + + - {personalIsFetching && ( - - )} { const searchEndpoint = 'api/searchHistory'; - const { data: historyData, isFetched: historyDataIsFetched } = useQueryAPI({ + const { + data: historyData, + isFetched: historyDataIsFetched, + isFetching: historyDataIsFetching, + } = useQueryAPI({ endpoint: searchEndpoint, }); const [searchHistory, setSearchHistory] = useState([]); @@ -92,7 +96,7 @@ const SearchHistory = () => { align='center' > - + { filtersEnabled={filtersEnabled} globalFilter={globalFilter} setGlobalFilter={setGlobalFilter} + isRefreshing={historyDataIsFetching} /> diff --git a/src/pages/settings/components/Search/SearchProviders.tsx b/src/pages/settings/components/Search/SearchProviders.tsx index c242acf..e79a389 100644 --- a/src/pages/settings/components/Search/SearchProviders.tsx +++ b/src/pages/settings/components/Search/SearchProviders.tsx @@ -6,6 +6,7 @@ import { Grid, GridCol, Group, + LoadingOverlay, Popover, Select, Stack, @@ -51,11 +52,15 @@ const SearchProviderSettings = () => { }, }); const endpoint = 'api/providers'; - const { data: providerData, isFetched: providerDataIsFetched } = useQueryAPI({ + const { + data: providerData, + isFetched: providerDataIsFetched, + isFetching: providerDataIsFetching, + } = useQueryAPI({ endpoint: endpoint, }); const [providers, setProviders] = useState([]); - const { isMobile, theme, filter } = useCommonHooks(); + const { isMobile, theme, iconFilter } = useCommonHooks(); const { mutateAsync } = useMutationAPI(); const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false); const [searchValue, setSearchValue] = useState(''); @@ -273,6 +278,16 @@ const SearchProviderSettings = () => { w={'100%'} align='center' > + {providers.length > 0 ? ( providers?.map((provider: Provider) => ( @@ -291,7 +306,7 @@ const SearchProviderSettings = () => { diff --git a/src/pages/settings/components/Theming/ThemePlaylists/ThemePlaylists.tsx b/src/pages/settings/components/Theming/ThemePlaylists/ThemePlaylists.tsx index 41dc9e4..ceffed0 100644 --- a/src/pages/settings/components/Theming/ThemePlaylists/ThemePlaylists.tsx +++ b/src/pages/settings/components/Theming/ThemePlaylists/ThemePlaylists.tsx @@ -1,4 +1,4 @@ -import { Box, Group, SimpleGrid, Stack, Text } from '@mantine/core'; +import { Box, Group, LoadingOverlay, SimpleGrid, Stack, Text } from '@mantine/core'; import { useDebouncedValue, useDisclosure } from '@mantine/hooks'; import { NoItemsFound, SettingsHeader } from 'components'; import { useCommonHooks, useMutationAPI, useQueryAPI } from 'hooks'; @@ -15,7 +15,11 @@ export function ThemePlaylists() { endpoint: themesEndpoint, }); const themePlaylistsEndpoint = 'api/themePlaylists'; - const { data: themePlaylistData, isFetched: isThemePlaylistDataFetched } = useQueryAPI({ + const { + data: themePlaylistData, + isFetched: themePlaylistDataIsFetched, + isFetching: themePlaylistDataIsFetching, + } = useQueryAPI({ endpoint: themePlaylistsEndpoint, }); const [themePlaylists, setThemePlaylists] = useState([]); @@ -54,7 +58,7 @@ export function ThemePlaylists() { }; useEffect(() => { - if (themePlaylistData && isThemePlaylistDataFetched) { + if (themePlaylistData && themePlaylistDataIsFetched) { setThemePlaylists( themePlaylistData.filter( (a: ThemePlaylist) => @@ -66,7 +70,7 @@ export function ThemePlaylists() { if (debouncedSearch === searchValue) { setIsLoading(false); } - }, [themePlaylistData, isThemePlaylistDataFetched, debouncedSearch]); + }, [themePlaylistData, themePlaylistDataIsFetched, debouncedSearch]); return ( @@ -97,6 +101,16 @@ export function ThemePlaylists() { setIsLoading={setIsLoading} /> + {allThemeData && ( <> diff --git a/src/pages/settings/components/Theming/ThemePlaylists/components/ThemeSelect.tsx b/src/pages/settings/components/Theming/ThemePlaylists/components/ThemeSelect.tsx index 25bc00f..33ad686 100644 --- a/src/pages/settings/components/Theming/ThemePlaylists/components/ThemeSelect.tsx +++ b/src/pages/settings/components/Theming/ThemePlaylists/components/ThemeSelect.tsx @@ -60,11 +60,11 @@ export function ThemeSelect({ height: '60px', color: theme?.primaryColor, backgroundImage: - theme?.backgroundImage.toLocaleLowerCase() !== 'none' - ? `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${theme?.backgroundImage})` - : undefined, + theme?.backgroundImage.toLocaleLowerCase() === 'none' + ? undefined + : `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${theme?.backgroundImage})`, backgroundSize: - theme?.backgroundImage.toLocaleLowerCase() !== 'none' ? 'cover' : undefined, + theme?.backgroundImage.toLocaleLowerCase() === 'none' ? undefined : 'cover', backgroundColor: theme?.backgroundImage.toLocaleLowerCase() === 'none' ? theme?.backgroundColor @@ -87,13 +87,13 @@ export function ThemeSelect({ h={'60px'} style={{ backgroundImage: - theme?.backgroundImage.toLocaleLowerCase() !== 'none' - ? `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${theme?.backgroundImage})` - : undefined, + theme?.backgroundImage.toLocaleLowerCase() === 'none' + ? undefined + : `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(../../api/backgroundImages/thumbs/${theme?.backgroundImage})`, backgroundSize: - theme?.backgroundImage.toLocaleLowerCase() !== 'none' - ? 'cover' - : undefined, + theme?.backgroundImage.toLocaleLowerCase() === 'none' + ? undefined + : 'cover', backgroundColor: theme?.backgroundImage.toLocaleLowerCase() === 'none' ? theme?.backgroundColor diff --git a/src/pages/settings/components/Theming/Themes/ThemeCard/ThemeCard.tsx b/src/pages/settings/components/Theming/Themes/ThemeCard/ThemeCard.tsx index e718a41..2267b0c 100644 --- a/src/pages/settings/components/Theming/Themes/ThemeCard/ThemeCard.tsx +++ b/src/pages/settings/components/Theming/Themes/ThemeCard/ThemeCard.tsx @@ -1,10 +1,5 @@ import { Box, Button, Group, Overlay, Stack, Text } from '@mantine/core'; -import { - useDebouncedState, - useDisclosure, - useElementSize, - useHover, -} from '@mantine/hooks'; +import { useDebouncedState, useDisclosure, useHover } from '@mantine/hooks'; import { DeleteItemModal } from 'components'; import { useCommonHooks } from 'hooks'; import { textClasses } from 'styles'; @@ -29,7 +24,6 @@ export function ThemeCard({ enabled?: boolean; }) { const { hovered, ref: hoverRef } = useHover(); - const { ref, width } = useElementSize(); const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false); const { currentTheme, setCurrentTheme, setCurrentThemePlaylist, handleDelete } = useCommonHooks(); @@ -83,7 +77,7 @@ export function ThemeCard({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', - maxWidth: width, + maxWidth: 275, }} > {cardTheme.name} @@ -111,19 +105,18 @@ export function ThemeCard({ /> + + + + + ) : ( <> Please choose an option: @@ -189,86 +269,6 @@ export function NewThemeStarter({ - ) : ( - - - {allThemes?.map((miniTheme: Theme) => { - return ( - { - !pressed && setSelectedTheme(miniTheme); - setPressed(false); - }} - > - {}} - /> - - ); - })} - - - - - - - - - )} ); diff --git a/src/pages/settings/components/Theming/Themes/ThemeModal/components/ThemeEditor.tsx b/src/pages/settings/components/Theming/Themes/ThemeModal/components/ThemeEditor.tsx index 7bfb113..d561833 100644 --- a/src/pages/settings/components/Theming/Themes/ThemeModal/components/ThemeEditor.tsx +++ b/src/pages/settings/components/Theming/Themes/ThemeModal/components/ThemeEditor.tsx @@ -84,7 +84,7 @@ export function ThemeEditor({ ? `linear-gradient(${selectedTheme.backgroundColor}88, ${selectedTheme.backgroundColor}88), no-repeat center url(../../api/backgroundImages/thumbs/${item})` : `no-repeat center url(../../api/backgroundImages/thumbs/${item})` : 'repeating-linear-gradient(45deg, #33333366, #33333366 10px, #88888866 10px, #88888866 20px)', - backgroundSize: item !== 'none' ? 'cover' : undefined, + backgroundSize: item === 'none' ? undefined : 'cover', backgroundColor: item === 'none' ? '#00000088' : undefined, paddingLeft: '.5rem', alignItems: 'center', @@ -639,12 +639,12 @@ export function ThemeEditor({