* Get pip working correctly

* Fix system graphs click and hover states
This commit is contained in:
Nicolas Mowen 2024-04-18 10:34:18 -06:00 committed by GitHub
parent 8230813b79
commit fb721ad031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 6 deletions

View File

@ -90,6 +90,13 @@ export function ThresholdBarGraph({
distributed: true,
},
},
states: {
active: {
filter: {
type: "none",
},
},
},
tooltip: {
theme: systemTheme || theme,
y: {
@ -192,6 +199,18 @@ export function StorageGraph({ graphId, used, total }: StorageGraphProps) {
horizontal: true,
},
},
states: {
active: {
filter: {
type: "none",
},
},
hover: {
filter: {
type: "none",
},
},
},
tooltip: {
enabled: false,
},

View File

@ -127,22 +127,22 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
if (mainRef.current == null) {
return;
}
const fsListener = () => {
setFullscreen(document.fullscreenElement != null);
};
const pipListener = () => {
setPip(document.pictureInPictureElement != null);
};
document.addEventListener("fullscreenchange", fsListener);
document.addEventListener("focusin", pipListener);
return () => {
document.removeEventListener("fullscreenchange", fsListener);
document.removeEventListener("focusin", pipListener);
};
}, [mainRef]);
useEffect(() => {
setPip(document.pictureInPictureElement != null);
// we know that these deps are correct
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [document.pictureInPictureElement]);
// playback state
const [audio, setAudio] = useState(false);