Open source video conferencing app powered by LiveKit. Built with Django and React.
♿️(frontend) add reduced-motion spinner fallback
Cyril27f202310497
diff --git a/src/frontend/src/primitives/Spinner.tsx b/src/frontend/src/primitives/Spinner.tsxindex fb8b8344..ed305721 100644--- a/src/frontend/src/primitives/Spinner.tsx+++ b/src/frontend/src/primitives/Spinner.tsx@@ -13,44 +13,70 @@ export const Spinner = ({const r = 14 - strokeWidthconst c = 2 * r * Math.PIreturn (- <ProgressBar aria-label="Loading…" value={30}>+ <ProgressBar aria-label="Loading..." value={30}>{({ percentage }) => (- <svg- width={size}- height={size}- viewBox="0 0 28 28"- fill="none"- strokeWidth={strokeWidth}+ <div+ className={css({+ display: 'inline-flex',+ alignItems: 'center',+ justifyContent: 'center',+ })}>- <circle- cx={center}- cy={center}- r={r}- strokeDasharray={0}- strokeDashoffset={0}- strokeLinecap="round"+ <svg+ width={size}+ height={size}+ viewBox="0 0 28 28"+ fill="none"+ strokeWidth={strokeWidth}className={css({- stroke: variant == 'light' ? 'primary.100' : 'transparent',+ '@media (prefers-reduced-motion: reduce)': {+ display: 'none',+ },})}- style={{}}- />- <circle- cx={center}- cy={center}- r={r}- strokeDasharray={`${c} ${c}`}- strokeDashoffset={percentage && c - (percentage / 100) * c}- strokeLinecap="round"+ >+ <circle+ cx={center}+ cy={center}+ r={r}+ strokeDasharray={0}+ strokeDashoffset={0}+ strokeLinecap="round"+ className={css({+ stroke: variant == 'light' ? 'primary.100' : 'transparent',+ })}+ style={{}}+ />+ <circle+ cx={center}+ cy={center}+ r={r}+ strokeDasharray={`${c} ${c}`}+ strokeDashoffset={percentage && c - (percentage / 100) * c}+ strokeLinecap="round"+ className={css({+ stroke: variant == 'light' ? 'primary.800' : 'white',+ })}+ style={{+ animation: `rotate 1s ease-in-out infinite`,+ transformOrigin: 'center',+ transition: 'transform 16ms linear',+ }}+ />+ </svg>+ <span+ aria-hidden="true"className={css({- stroke: variant == 'light' ? 'primary.800' : 'white',+ display: 'none',+ color: variant == 'light' ? 'primary.800' : 'white',+ fontSize: 'sm',+ '@media (prefers-reduced-motion: reduce)': {+ display: 'inline',+ },})}- style={{- animation: `rotate 1s ease-in-out infinite`,- transformOrigin: 'center',- transition: 'transform 16ms linear',- }}- />- </svg>+ >+ ⏳+ </span>+ </div>)}</ProgressBar>)