replace and fix position of current track play icon

This commit is contained in:
jeffvli 2025-06-03 01:05:19 -07:00
parent e8a94a0b1c
commit 636c227a83

View file

@ -1,5 +1,7 @@
import type { ICellRendererParams } from '@ag-grid-community/core'; import type { ICellRendererParams } from '@ag-grid-community/core';
import { RiPlayFill } from 'react-icons/ri';
import { Text } from '/@/renderer/components/text'; import { Text } from '/@/renderer/components/text';
import { CellContainer } from '/@/renderer/components/virtual-table/cells/generic-cell'; import { CellContainer } from '/@/renderer/components/virtual-table/cells/generic-cell';
@ -93,45 +95,45 @@ import { CellContainer } from '/@/renderer/components/virtual-table/cells/generi
// ); // );
// }; // };
const StaticSvg = () => { // const StaticSvg = () => {
return ( // return (
<div style={{ height: '1rem', transform: 'rotate(180deg)', width: '1rem' }}> // <div style={{ height: '1rem', transform: 'rotate(180deg)', width: '1rem' }}>
<svg // <svg
viewBox="100 130 57 80" // viewBox="100 130 57 80"
xmlns="http://www.w3.org/2000/svg" // xmlns="http://www.w3.org/2000/svg"
> // >
<rect // <rect
fill="var(--primary-color)" // fill="var(--primary-color)"
height="20" // height="20"
width="12" // width="12"
x="100" // x="100"
y="130" // y="130"
/> // />
<rect // <rect
fill="var(--primary-color)" // fill="var(--primary-color)"
height="60" // height="60"
width="12" // width="12"
x="115" // x="115"
y="130" // y="130"
/> // />
<rect // <rect
fill="var(--primary-color)" // fill="var(--primary-color)"
height="80" // height="80"
width="12" // width="12"
x="130" // x="130"
y="130" // y="130"
/> // />
<rect // <rect
fill="var(--primary-color)" // fill="var(--primary-color)"
height="45" // height="45"
width="12" // width="12"
x="145" // x="145"
y="130" // y="130"
/> // />
</svg> // </svg>
</div> // </div>
); // );
}; // };
export const RowIndexCell = ({ eGridCell, value }: ICellRendererParams) => { export const RowIndexCell = ({ eGridCell, value }: ICellRendererParams) => {
const classList = eGridCell.classList; const classList = eGridCell.classList;
@ -142,7 +144,13 @@ export const RowIndexCell = ({ eGridCell, value }: ICellRendererParams) => {
return ( return (
<CellContainer $position="right"> <CellContainer $position="right">
{isPlaying && (isCurrentSong ? <StaticSvg /> : null)} {isPlaying &&
(isCurrentSong ? (
<RiPlayFill
color="var(--primary-color)"
size="1.2rem"
/>
) : null)}
<Text <Text
$secondary $secondary
align="right" align="right"