diff --git a/src/App.tsx b/src/App.tsx index aa9ab5e..8fe711e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -35,6 +35,7 @@ const App = () => { const [theme, setTheme] = useState(defaultDark); const [font, setFont] = useState('Poppins'); const misc = useAppSelector((state) => state.misc); + const config = useAppSelector((state) => state.config); useEffect(() => { const themes: any = @@ -45,8 +46,8 @@ const App = () => { }, [misc.theme]); useEffect(() => { - setFont(misc.font); - }, [misc.font]); + setFont(config.lookAndFeel.font); + }, [config.lookAndFeel.font]); if (!localStorage.getItem('server') || !localStorage.getItem('serverBase64')) { return ( diff --git a/src/__tests__/App.test.tsx b/src/__tests__/App.test.tsx index 9a30626..660e9a1 100644 --- a/src/__tests__/App.test.tsx +++ b/src/__tests__/App.test.tsx @@ -72,7 +72,6 @@ const playerState: Player = { const miscState: General = { theme: 'defaultDark', - font: 'Poppins', contextMenu: { show: false, }, @@ -136,6 +135,7 @@ const configState: ConfigPage = { sort: {}, serverType: Server.Subsonic, lookAndFeel: { + font: 'Poppins', listView: { music: { columns: [ diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index cfba65f..790004a 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -10,7 +10,7 @@ import { RootContainer, RootFooter, MainContainer } from './styled'; import { setContextMenu } from '../../redux/miscSlice'; import { useAppDispatch, useAppSelector } from '../../redux/hooks'; import { clearSelected } from '../../redux/multiSelectSlice'; -import { StyledButton, StyledNavItem, StyledPopover } from '../shared/styled'; +import { StyledButton, StyledNavItem } from '../shared/styled'; import { GridViewConfigPanel, ListViewConfigPanel, @@ -25,6 +25,7 @@ import WindowConfig from '../settings/ConfigPanels/WindowConfig'; import AdvancedConfig from '../settings/ConfigPanels/AdvancedConfig'; import { setSidebar } from '../../redux/configSlice'; import SearchBar from '../search/SearchBar'; +import Popup from '../shared/Popup'; const Layout = ({ footer, children, disableSidebar, font }: any) => { const { t } = useTranslation(); @@ -157,7 +158,7 @@ const Layout = ({ footer, children, disableSidebar, font }: any) => { { )} - + } trigger="click" placement="bottomEnd" diff --git a/src/components/library/AlbumList.tsx b/src/components/library/AlbumList.tsx index cb008c3..453038b 100644 --- a/src/components/library/AlbumList.tsx +++ b/src/components/library/AlbumList.tsx @@ -16,7 +16,6 @@ import { StyledInputPicker, StyledInputPickerContainer, StyledNavItem, - StyledPopover, StyledTag, } from '../shared/styled'; import { FilterButton, RefreshButton } from '../shared/ToolbarButtons'; @@ -31,6 +30,7 @@ import { setFilter, setPagination, setAdvancedFilters, setColumnSort } from '../ import useGridScroll from '../../hooks/useGridScroll'; import useListScroll from '../../hooks/useListScroll'; import useListClickHandler from '../../hooks/useListClickHandler'; +import Popup from '../shared/Popup'; export const ALBUM_SORT_TYPES = [ { label: i18n.t('A-Z (Name)'), value: 'alphabeticalByName', role: i18n.t('Default') }, @@ -315,7 +315,7 @@ const AlbumList = () => { placement="bottomEnd" preventOverflow speaker={ - +