Style updates

This commit is contained in:
Sean Edmunds
2025-06-20 15:24:27 -05:00
parent b122b1af18
commit 25c0ae223e
5 changed files with 61 additions and 57 deletions

View File

@@ -11,7 +11,7 @@ export function useCommonHooks() {
const [theme, setTheme] = useAtom(appTheme); const [theme, setTheme] = useAtom(appTheme);
const [themeName, setThemeName] = useLocalStorage<string>({ const [themeName, setThemeName] = useLocalStorage<string>({
key: 'theme', key: 'theme',
defaultValue: 'blackboard', defaultValue: 'random',
}); });
const [appFilter, setAppFilter] = useLocalStorage<string[]>({ const [appFilter, setAppFilter] = useLocalStorage<string[]>({
key: 'appFilter', key: 'appFilter',
@@ -35,11 +35,11 @@ export function useCommonHooks() {
}); });
const [bookmarkDensity, setBookmarkDensity] = useLocalStorage<number>({ const [bookmarkDensity, setBookmarkDensity] = useLocalStorage<number>({
key: 'bookmarkDensity', key: 'bookmarkDensity',
defaultValue: 5, defaultValue: 6,
}); });
const [currentTheme, setCurrentTheme] = useLocalStorage<string>({ const [currentTheme, setCurrentTheme] = useLocalStorage<string>({
key: 'theme', key: 'theme',
defaultValue: 'blackboard', defaultValue: 'random',
}); });
const [currentThemePlaylist, setCurrentThemePlaylist] = useLocalStorage<string>({ const [currentThemePlaylist, setCurrentThemePlaylist] = useLocalStorage<string>({
key: 'themePlaylist', key: 'themePlaylist',

View File

@@ -14,7 +14,7 @@ import {
import { useCommonHooks } from 'hooks'; import { useCommonHooks } from 'hooks';
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import { FiSave, FiX } from 'react-icons/fi'; import { FiSave, FiX } from 'react-icons/fi';
import { modalClasses, textClasses, textInputClasses } from 'styles'; import { modalClasses, scrollAreaClasses, textClasses, textInputClasses } from 'styles';
import type { Theme } from 'types'; import type { Theme } from 'types';
import ThemeModalContent from './ThemeModalContent'; import ThemeModalContent from './ThemeModalContent';
@@ -56,7 +56,8 @@ function ThemeModal({
); );
const re = /(?:\.([^.]+))?$/; const re = /(?:\.([^.]+))?$/;
const items = filtered.map((item: string, index: number) => ( const items = filtered.map((item: string, index: number) => {
return (
<UnstyledButton <UnstyledButton
data-list-item data-list-item
key={item} key={item}
@@ -64,11 +65,11 @@ function ThemeModal({
width: '100%', width: '100%',
height: '75px', height: '75px',
background: background:
item !== 'none' item !== 'none' && item !== 'None'
? index === hovered ? index === hovered
? `linear-gradient(${selectedTheme.backgroundColor}88, ${selectedTheme.backgroundColor}88), no-repeat center url(../../api/backgroundImages/${item})` ? `linear-gradient(${selectedTheme.backgroundColor}88, ${selectedTheme.backgroundColor}88), no-repeat center url(../../api/backgroundImages/${item})`
: `no-repeat center url(../../api/backgroundImages/${item})` : `no-repeat center url(../../api/backgroundImages/${item})`
: undefined, : 'repeating-linear-gradient(45deg, #33333366, #33333366 10px, #88888866 10px, #88888866 20px)',
backgroundSize: item !== 'none' ? 'cover' : undefined, backgroundSize: item !== 'none' ? 'cover' : undefined,
backgroundColor: item === 'none' ? '#00000088' : undefined, backgroundColor: item === 'none' ? '#00000088' : undefined,
paddingLeft: '.5rem', paddingLeft: '.5rem',
@@ -112,7 +113,8 @@ function ThemeModal({
)} )}
</Group> </Group>
</UnstyledButton> </UnstyledButton>
)); );
});
useEffect(() => { useEffect(() => {
if (selectedTheme) { if (selectedTheme) {
@@ -393,6 +395,8 @@ function ThemeModal({
</Group> </Group>
<ScrollArea.Autosize <ScrollArea.Autosize
viewportRef={viewportRef} viewportRef={viewportRef}
className={scrollAreaClasses.default}
classNames={scrollAreaClasses}
style={{ style={{
height: 150, height: 150,
width: '90%', width: '90%',

View File

@@ -77,7 +77,7 @@ function ThemePlaylistCard({
color: color:
theme.borderColor === theme.primaryColor theme.borderColor === theme.primaryColor
? 'var(--mantine-color-accent-0)' ? 'var(--mantine-color-accent-0)'
: 'var(--mantine-color-background-0)', : 'var(--mantine-color-primary-0)',
zIndex: 3, zIndex: 3,
}} }}
> >
@@ -96,7 +96,7 @@ function ThemePlaylistCard({
color: color:
theme.borderColor === theme.primaryColor theme.borderColor === theme.primaryColor
? 'var(--mantine-color-accent-0)' ? 'var(--mantine-color-accent-0)'
: 'var(--mantine-color-background-0)', : 'var(--mantine-color-primary-0)',
zIndex: 3, zIndex: 3,
}} }}
onClick={() => { onClick={() => {
@@ -119,7 +119,7 @@ function ThemePlaylistCard({
color: color:
theme.borderColor === theme.primaryColor theme.borderColor === theme.primaryColor
? 'var(--mantine-color-accent-0)' ? 'var(--mantine-color-accent-0)'
: 'var(--mantine-color-background-0)', : 'var(--mantine-color-red-6)',
zIndex: 3, zIndex: 3,
}} }}
onClick={() => { onClick={() => {

View File

@@ -128,7 +128,7 @@ function ThemePlaylists() {
color: color:
theme.borderColor === theme.primaryColor theme.borderColor === theme.primaryColor
? 'var(--mantine-color-accent-0)' ? 'var(--mantine-color-accent-0)'
: 'var(--mantine-color-background-0)', : 'var(--mantine-color-primary-0)',
}} }}
/> />
)} )}

View File

@@ -52,7 +52,7 @@
padding: .5rem; padding: .5rem;
margin: 0; margin: 0;
background-color: var(--mantine-color-search-0); background-color: var(--mantine-color-search-0);
color: var(--mantine-color-accent-0); color: var(--mantine-color-primary-0);
} }
&:hover { &:hover {
background-color: var(--mantine-color-primary-0) !important; background-color: var(--mantine-color-primary-0) !important;