diff --git a/src/components/layout/styled.tsx b/src/components/layout/styled.tsx index b50ed44..256a1cd 100644 --- a/src/components/layout/styled.tsx +++ b/src/components/layout/styled.tsx @@ -205,12 +205,17 @@ export const CoverArtWrapper = styled.div<{ $link?: boolean; size: number }>` height: ${(props) => props.size}px; width: ${(props) => props.size}px; overflow: hidden; - + border-radius: ${(props) => props.theme.other.coverArtBorderRadius}; background: ${(props) => props.theme.colors.layout.page.background}; + vertical-align: middle; &:focus-visible { outline: 2px ${(props) => props.theme.colors.primary} solid; } + + img { + vertical-align: unset !important; + } `; export const PageHeaderTitle = styled.h1` diff --git a/src/components/player/PlayerBar.tsx b/src/components/player/PlayerBar.tsx index b09a1be..d382e3a 100644 --- a/src/components/player/PlayerBar.tsx +++ b/src/components/player/PlayerBar.tsx @@ -344,32 +344,34 @@ const PlayerBar = () => { } > - + history.push(`/nowplaying`)} - onKeyDown={(e: any) => { - if (e.key === ' ' || e.key === 'Enter') { - history.push(`/nowplaying`); + ) + ? `${misc.imageCachePath}album_${ + playQueue[currentEntryList][playQueue.currentIndex]?.albumId + }.jpg` + : playQueue[currentEntryList][playQueue.currentIndex]?.image || + placeholderImg } - }} - alt="trackImg" - effect="opacity" - width="65" - height="65" - style={{ cursor: 'pointer' }} - /> + tabIndex={0} + onClick={() => history.push(`/nowplaying`)} + onKeyDown={(e: any) => { + if (e.key === ' ' || e.key === 'Enter') { + history.push(`/nowplaying`); + } + }} + alt="trackImg" + effect="opacity" + width="65" + height="65" + style={{ cursor: 'pointer' }} + /> + diff --git a/src/components/shared/setDefaultSettings.ts b/src/components/shared/setDefaultSettings.ts index 2585099..9255f94 100644 --- a/src/components/shared/setDefaultSettings.ts +++ b/src/components/shared/setDefaultSettings.ts @@ -595,7 +595,8 @@ const setDefaultSettings = (force: boolean) => { button: { borderRadius: '0px', }, - coverArtFilter: 'drop-shadow(0px 3px 5px #000000)', + coverArtBorderRadius: '5px', + coverArtFilter: 'none', card: { border: '1px #3c3f43 solid', hover: { @@ -760,7 +761,8 @@ const setDefaultSettings = (force: boolean) => { button: { borderRadius: '0px', }, - coverArtFilter: 'drop-shadow(0px 3px 5px #000000)', + coverArtBorderRadius: '5px', + coverArtFilter: 'none', card: { border: '1px #3c3f43 solid', hover: { diff --git a/src/components/viewtypes/ListViewTable.tsx b/src/components/viewtypes/ListViewTable.tsx index 9cc76a9..eba2ad4 100644 --- a/src/components/viewtypes/ListViewTable.tsx +++ b/src/components/viewtypes/ListViewTable.tsx @@ -60,6 +60,7 @@ import { import { setActive } from '../../redux/albumSlice'; import { resetPlayer, setStatus } from '../../redux/playerSlice'; import { GenericItem } from '../../types'; +import { CoverArtWrapper } from '../layout/styled'; const StyledTable = styled(Table)<{ rowHeight: number; $isDragging: boolean }>` .rs-table-row.selected { @@ -647,34 +648,36 @@ const ListViewTable = ({ width: `${rowHeight}px`, }} > - + { - if (cacheImages.enabled) { - cacheImage( - `${cacheImages.cacheType}_${ - rowData[cacheImages.cacheIdProperty] - }.jpg`, - rowData.image.replaceAll(/=150/gi, '=350') - ); + ) + ? `${misc.imageCachePath}${cacheImages.cacheType}_${ + rowData[cacheImages.cacheIdProperty] + }.jpg` + : rowData.image } - }} - /> + alt="track-img" + effect="opacity" + width={rowHeight - 10} + height={rowHeight - 10} + visibleByDefault={cacheImages.enabled} + afterLoad={() => { + if (cacheImages.enabled) { + cacheImage( + `${cacheImages.cacheType}_${ + rowData[cacheImages.cacheIdProperty] + }.jpg`, + rowData.image.replaceAll(/=150/gi, '=350') + ); + } + }} + /> + - + { - if (cacheImages.enabled) { - cacheImage( - `${cacheImages.cacheType}_${ - rowData[cacheImages.cacheIdProperty] - }.jpg`, - rowData.image.replaceAll(/=150/gi, '=350') - ); + ) + ? `${misc.imageCachePath}${cacheImages.cacheType}_${ + rowData[cacheImages.cacheIdProperty] + }.jpg` + : rowData.image } - }} - /> + alt="track-img" + effect="opacity" + width={rowHeight - 10} + height={rowHeight - 10} + visibleByDefault={cacheImages.enabled} + afterLoad={() => { + if (cacheImages.enabled) { + cacheImage( + `${cacheImages.cacheType}_${ + rowData[cacheImages.cacheIdProperty] + }.jpg`, + rowData.image.replaceAll(/=150/gi, '=350') + ); + } + }} + /> + ); }}