mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Various UI tweaks and changes (#12364)
This commit is contained in:
parent
aacb8c84e0
commit
d2f88491b1
@ -5,9 +5,12 @@ import { useLocation } from "react-router-dom";
|
|||||||
import GeneralSettings from "../menu/GeneralSettings";
|
import GeneralSettings from "../menu/GeneralSettings";
|
||||||
import AccountSettings from "../menu/AccountSettings";
|
import AccountSettings from "../menu/AccountSettings";
|
||||||
import useNavigation from "@/hooks/use-navigation";
|
import useNavigation from "@/hooks/use-navigation";
|
||||||
|
import { baseUrl } from "@/api/baseUrl";
|
||||||
|
import { useMemo } from "react";
|
||||||
|
|
||||||
function Sidebar() {
|
function Sidebar() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
const basePath = useMemo(() => new URL(baseUrl).pathname, []);
|
||||||
|
|
||||||
const navbarLinks = useNavigation();
|
const navbarLinks = useNavigation();
|
||||||
|
|
||||||
@ -18,7 +21,8 @@ function Sidebar() {
|
|||||||
<Logo className="mb-6 h-8 w-8" />
|
<Logo className="mb-6 h-8 w-8" />
|
||||||
{navbarLinks.map((item) => {
|
{navbarLinks.map((item) => {
|
||||||
const showCameraGroups =
|
const showCameraGroups =
|
||||||
item.id == 1 && item.url == location.pathname;
|
item.id == 1 &&
|
||||||
|
(location.pathname === "/" || location.pathname === basePath);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={item.id}>
|
<div key={item.id}>
|
||||||
|
@ -161,7 +161,7 @@ export default function HlsVideoPlayer({
|
|||||||
}, [videoRef, controlsOpen]);
|
}, [videoRef, controlsOpen]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TransformWrapper minScale={1.0}>
|
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
|
||||||
<VideoControls
|
<VideoControls
|
||||||
className={cn(
|
className={cn(
|
||||||
"absolute left-1/2 z-50 -translate-x-1/2",
|
"absolute left-1/2 z-50 -translate-x-1/2",
|
||||||
|
@ -456,7 +456,7 @@ function PlusFilterGroup({
|
|||||||
<div className="hidden text-primary md:block">
|
<div className="hidden text-primary md:block">
|
||||||
{selectedScoreRange == undefined
|
{selectedScoreRange == undefined
|
||||||
? "Score Range"
|
? "Score Range"
|
||||||
: `${selectedScoreRange[0] * 100}% - ${selectedScoreRange[1] * 100}%`}
|
: `${Math.round(selectedScoreRange[0] * 100)}% - ${Math.round(selectedScoreRange[1] * 100)}%`}
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
@ -111,7 +111,7 @@ export default function LiveBirdseyeView({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TransformWrapper minScale={1.0}>
|
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
|
||||||
<div
|
<div
|
||||||
ref={mainRef}
|
ref={mainRef}
|
||||||
className={
|
className={
|
||||||
|
@ -295,7 +295,7 @@ export default function LiveCameraView({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TransformWrapper minScale={1.0}>
|
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
|
||||||
<div
|
<div
|
||||||
ref={mainRef}
|
ref={mainRef}
|
||||||
className={
|
className={
|
||||||
|
Loading…
Reference in New Issue
Block a user