pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

esc now closes the caption preview

Pas c6873907 665d06c8

+17
+17
src/pages/parts/settings/CaptionsPart.tsx
··· 28 28 onToggle: () => void; 29 29 }) { 30 30 const { t } = useTranslation(); 31 + const { fullscreen, show, onToggle } = props; 32 + 33 + useEffect(() => { 34 + if (!fullscreen || !show) return; 35 + 36 + const handleKeyDown = (e: KeyboardEvent) => { 37 + if (e.key === "Escape") { 38 + onToggle(); 39 + } 40 + }; 41 + 42 + window.addEventListener("keydown", handleKeyDown); 43 + return () => { 44 + window.removeEventListener("keydown", handleKeyDown); 45 + }; 46 + }, [fullscreen, show, onToggle]); 47 + 31 48 return ( 32 49 <div 33 50 className={classNames({