mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
UI fixes (#11012)
* Get pip working correctly * Fix system graphs click and hover states
This commit is contained in:
parent
8230813b79
commit
fb721ad031
@ -90,6 +90,13 @@ export function ThresholdBarGraph({
|
|||||||
distributed: true,
|
distributed: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
states: {
|
||||||
|
active: {
|
||||||
|
filter: {
|
||||||
|
type: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
theme: systemTheme || theme,
|
theme: systemTheme || theme,
|
||||||
y: {
|
y: {
|
||||||
@ -192,6 +199,18 @@ export function StorageGraph({ graphId, used, total }: StorageGraphProps) {
|
|||||||
horizontal: true,
|
horizontal: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
states: {
|
||||||
|
active: {
|
||||||
|
filter: {
|
||||||
|
type: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hover: {
|
||||||
|
filter: {
|
||||||
|
type: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
|
@ -127,22 +127,22 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
|||||||
if (mainRef.current == null) {
|
if (mainRef.current == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fsListener = () => {
|
const fsListener = () => {
|
||||||
setFullscreen(document.fullscreenElement != null);
|
setFullscreen(document.fullscreenElement != null);
|
||||||
};
|
};
|
||||||
const pipListener = () => {
|
|
||||||
setPip(document.pictureInPictureElement != null);
|
|
||||||
};
|
|
||||||
document.addEventListener("fullscreenchange", fsListener);
|
document.addEventListener("fullscreenchange", fsListener);
|
||||||
document.addEventListener("focusin", pipListener);
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
document.removeEventListener("fullscreenchange", fsListener);
|
document.removeEventListener("fullscreenchange", fsListener);
|
||||||
document.removeEventListener("focusin", pipListener);
|
|
||||||
};
|
};
|
||||||
}, [mainRef]);
|
}, [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
|
// playback state
|
||||||
|
|
||||||
const [audio, setAudio] = useState(false);
|
const [audio, setAudio] = useState(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user