mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
Fix refresh button and no items text
This commit is contained in:
parent
656dcc74be
commit
1af3561a0f
@ -74,7 +74,7 @@ export default function Events() {
|
|||||||
};
|
};
|
||||||
return ["review", params];
|
return ["review", params];
|
||||||
},
|
},
|
||||||
[reviewSearchParams]
|
[reviewSearchParams, last24Hours]
|
||||||
);
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -97,10 +97,7 @@ export default function Events() {
|
|||||||
setSize(size + 1);
|
setSize(size + 1);
|
||||||
}, [size]);
|
}, [size]);
|
||||||
|
|
||||||
const reloadData = useCallback(() => {
|
const reloadData = useCallback(() => setBeforeTs(Date.now() / 1000), []);
|
||||||
setSize(1);
|
|
||||||
setBeforeTs(Date.now() / 1000);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// preview videos
|
// preview videos
|
||||||
|
|
||||||
|
|||||||
@ -97,8 +97,9 @@ function Logs() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!endVisible && (
|
{!endVisible && (
|
||||||
<div
|
<Button
|
||||||
className="absolute bottom-8 left-[50%] -translate-x-[50%] rounded-xl bg-accent-foreground text-white z-20 p-2"
|
className="absolute bottom-8 left-[50%] -translate-x-[50%] rounded-xl bg-accent-foreground text-white bg-gray-400 z-20 p-2"
|
||||||
|
variant="secondary"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
contentRef.current?.scrollTo({
|
contentRef.current?.scrollTo({
|
||||||
top: contentRef.current?.scrollHeight,
|
top: contentRef.current?.scrollHeight,
|
||||||
@ -107,7 +108,7 @@ function Logs() {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
Jump to Bottom
|
Jump to Bottom
|
||||||
</div>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -191,7 +191,9 @@ export default function EventView({
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col size-full">
|
<div className="flex flex-col size-full">
|
||||||
<div className="relative flex justify-between mb-2">
|
<div className="relative flex justify-between mb-2">
|
||||||
|
{isMobile && (
|
||||||
<Logo className="absolute inset-y-0 inset-x-1/2 -translate-x-1/2 h-8" />
|
<Logo className="absolute inset-y-0 inset-x-1/2 -translate-x-1/2 h-8" />
|
||||||
|
)}
|
||||||
<ToggleGroup
|
<ToggleGroup
|
||||||
className="*:px-3 *:py4 *:rounded-2xl"
|
className="*:px-3 *:py4 *:rounded-2xl"
|
||||||
type="single"
|
type="single"
|
||||||
@ -234,14 +236,16 @@ export default function EventView({
|
|||||||
ref={contentRef}
|
ref={contentRef}
|
||||||
className="flex flex-1 flex-wrap content-start gap-2 overflow-y-auto no-scrollbar"
|
className="flex flex-1 flex-wrap content-start gap-2 overflow-y-auto no-scrollbar"
|
||||||
>
|
>
|
||||||
{filter?.before == undefined && (<NewReviewData
|
{filter?.before == undefined && (
|
||||||
|
<NewReviewData
|
||||||
className="absolute w-full z-30"
|
className="absolute w-full z-30"
|
||||||
contentRef={contentRef}
|
contentRef={contentRef}
|
||||||
severity={severity}
|
severity={severity}
|
||||||
pullLatestData={pullLatestData}
|
pullLatestData={pullLatestData}
|
||||||
/>)}
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{reachedEnd && currentItems == null && (
|
{!isValidating && currentItems == null && (
|
||||||
<div className="size-full flex flex-col justify-center items-center">
|
<div className="size-full flex flex-col justify-center items-center">
|
||||||
<LuFolderCheck className="size-16" />
|
<LuFolderCheck className="size-16" />
|
||||||
There are no {severity} items to review
|
There are no {severity} items to review
|
||||||
@ -287,9 +291,9 @@ export default function EventView({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
) : (
|
) : severity != "alert" ? (
|
||||||
<div ref={lastReviewRef} />
|
<div ref={lastReviewRef} />
|
||||||
)}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-[55px] md:w-[100px] mt-2 overflow-y-auto no-scrollbar">
|
<div className="w-[55px] md:w-[100px] mt-2 overflow-y-auto no-scrollbar">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user