mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 19:55:26 +03:00
fixup build
This commit is contained in:
parent
82064975ac
commit
dc09e5cf71
@ -48,6 +48,8 @@ export default function HistoryCard({
|
|||||||
{formatUnixTimestampToDateTime(timeline.time, {
|
{formatUnixTimestampToDateTime(timeline.time, {
|
||||||
strftime_fmt:
|
strftime_fmt:
|
||||||
config.ui.time_format == "24hour" ? "%H:%M:%S" : "%I:%M:%S",
|
config.ui.time_format == "24hour" ? "%H:%M:%S" : "%I:%M:%S",
|
||||||
|
time_style: "medium",
|
||||||
|
date_style: "medium",
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className="capitalize text-sm flex align-center mt-1">
|
<div className="capitalize text-sm flex align-center mt-1">
|
||||||
|
|||||||
@ -46,12 +46,11 @@ export default function VideoPlayer({
|
|||||||
// Make sure Video.js player is only initialized once
|
// Make sure Video.js player is only initialized once
|
||||||
if (!playerRef.current) {
|
if (!playerRef.current) {
|
||||||
// The Video.js player needs to be _inside_ the component el for React 18 Strict Mode.
|
// The Video.js player needs to be _inside_ the component el for React 18 Strict Mode.
|
||||||
const videoElement = document.createElement("video-js");
|
const videoElement = document.createElement(
|
||||||
// @ts-ignore we know this is a video element
|
"video-js"
|
||||||
|
) as HTMLVideoElement;
|
||||||
videoElement.controls = true;
|
videoElement.controls = true;
|
||||||
// @ts-ignore
|
|
||||||
videoElement.playsInline = true;
|
videoElement.playsInline = true;
|
||||||
// @ts-ignore
|
|
||||||
videoElement.disableRemotePlayback = remotePlayback;
|
videoElement.disableRemotePlayback = remotePlayback;
|
||||||
videoElement.classList.add("small-player");
|
videoElement.classList.add("small-player");
|
||||||
videoElement.classList.add("video-js");
|
videoElement.classList.add("video-js");
|
||||||
|
|||||||
@ -52,10 +52,8 @@ function Calendar({
|
|||||||
...classNames,
|
...classNames,
|
||||||
}}
|
}}
|
||||||
components={{
|
components={{
|
||||||
// @ts-ignore
|
IconLeft: () => <ChevronLeft className="h-4 w-4" />,
|
||||||
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
|
IconRight: () => <ChevronRight className="h-4 w-4" />,
|
||||||
// @ts-ignore
|
|
||||||
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
|
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -186,6 +186,8 @@ function History() {
|
|||||||
<Heading as="h3">
|
<Heading as="h3">
|
||||||
{formatUnixTimestampToDateTime(parseInt(day), {
|
{formatUnixTimestampToDateTime(parseInt(day), {
|
||||||
strftime_fmt: "%A %b %d",
|
strftime_fmt: "%A %b %d",
|
||||||
|
time_style: "medium",
|
||||||
|
date_style: "medium",
|
||||||
})}
|
})}
|
||||||
</Heading>
|
</Heading>
|
||||||
{Object.entries(timelineDay).map(
|
{Object.entries(timelineDay).map(
|
||||||
@ -205,12 +207,15 @@ function History() {
|
|||||||
<Heading as="h4">
|
<Heading as="h4">
|
||||||
{formatUnixTimestampToDateTime(parseInt(hour), {
|
{formatUnixTimestampToDateTime(parseInt(hour), {
|
||||||
strftime_fmt: "%I:00",
|
strftime_fmt: "%I:00",
|
||||||
|
time_style: "medium",
|
||||||
|
date_style: "medium",
|
||||||
})}
|
})}
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|
||||||
<div className="flex flex-wrap">
|
<div className="flex flex-wrap">
|
||||||
{Object.entries(timelineHour).reverse().map(
|
{Object.entries(timelineHour)
|
||||||
([key, timeline]) => {
|
.reverse()
|
||||||
|
.map(([key, timeline]) => {
|
||||||
const startTs = Object.values(timeline.entries)[0]
|
const startTs = Object.values(timeline.entries)[0]
|
||||||
.timestamp;
|
.timestamp;
|
||||||
let relevantPreview = previewMap[timeline.camera];
|
let relevantPreview = previewMap[timeline.camera];
|
||||||
@ -235,8 +240,7 @@ function History() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
})}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
{lastRow && <ActivityIndicator />}
|
{lastRow && <ActivityIndicator />}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import strftime from "strftime";
|
import strftime from 'strftime';
|
||||||
import { fromUnixTime, intervalToDuration, formatDuration } from "date-fns";
|
import { fromUnixTime, intervalToDuration, formatDuration } from 'date-fns';
|
||||||
export const longToDate = (long: number): Date => new Date(long * 1000);
|
export const longToDate = (long: number): Date => new Date(long * 1000);
|
||||||
export const epochToLong = (date: number): number => date / 1000;
|
export const epochToLong = (date: number): number => date / 1000;
|
||||||
export const dateToLong = (date: Date): number => epochToLong(date.getTime());
|
export const dateToLong = (date: Date): number => epochToLong(date.getTime());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user