mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-29 16:41:16 +03:00
Review changes
This commit is contained in:
parent
bf25560067
commit
8f6e083420
@ -6,19 +6,8 @@
|
|||||||
"initializeCommand": ".devcontainer/initialize.sh",
|
"initializeCommand": ".devcontainer/initialize.sh",
|
||||||
"postCreateCommand": ".devcontainer/post_create.sh",
|
"postCreateCommand": ".devcontainer/post_create.sh",
|
||||||
"overrideCommand": false,
|
"overrideCommand": false,
|
||||||
"remoteUser": "vscode",
|
"remoteUser": "root",
|
||||||
"features": {
|
"features": {},
|
||||||
"ghcr.io/devcontainers/features/common-utils:2": {}
|
|
||||||
// Uncomment the following lines to use ONNX Runtime with CUDA support
|
|
||||||
// "ghcr.io/devcontainers/features/nvidia-cuda:1": {
|
|
||||||
// "installCudnn": true,
|
|
||||||
// "installNvtx": true,
|
|
||||||
// "installToolkit": true,
|
|
||||||
// "cudaVersion": "12.5",
|
|
||||||
// "cudnnVersion": "9.4.0.58"
|
|
||||||
// },
|
|
||||||
// "./features/onnxruntime-gpu": {}
|
|
||||||
},
|
|
||||||
"forwardPorts": [
|
"forwardPorts": [
|
||||||
8971,
|
8971,
|
||||||
5000,
|
5000,
|
||||||
|
|||||||
@ -13,8 +13,12 @@ fi
|
|||||||
# Frigate normal container runs as root, so it have permission to create
|
# Frigate normal container runs as root, so it have permission to create
|
||||||
# the folders. But the devcontainer runs as the host user, so we need to
|
# the folders. But the devcontainer runs as the host user, so we need to
|
||||||
# create the folders and give the host user permission to write to them.
|
# create the folders and give the host user permission to write to them.
|
||||||
sudo mkdir -p /media/frigate
|
SUDO=""
|
||||||
sudo chown -R "$(id -u):$(id -g)" /media/frigate
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
$SUDO mkdir -p /media/frigate
|
||||||
|
$SUDO chown -R "$(id -u):$(id -g)" /media/frigate
|
||||||
|
|
||||||
# When started as a service, LIBAVFORMAT_VERSION_MAJOR is defined in the
|
# When started as a service, LIBAVFORMAT_VERSION_MAJOR is defined in the
|
||||||
# s6 service file. For dev, where frigate is started from an interactive
|
# s6 service file. For dev, where frigate is started from an interactive
|
||||||
|
|||||||
@ -42,7 +42,6 @@ import {
|
|||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { selectTriggerClassName } from "@/components/ui/select";
|
|
||||||
import { formatUnixTimestampToDateTime } from "@/utils/dateUtil";
|
import { formatUnixTimestampToDateTime } from "@/utils/dateUtil";
|
||||||
import { use24HourTime } from "@/hooks/use-date-utils";
|
import { use24HourTime } from "@/hooks/use-date-utils";
|
||||||
import FilterSwitch from "@/components/filter/FilterSwitch";
|
import FilterSwitch from "@/components/filter/FilterSwitch";
|
||||||
@ -816,11 +815,11 @@ export function CameraNotificationSwitch({
|
|||||||
|
|
||||||
{!isSuspended ? (
|
{!isSuspended ? (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger
|
<DropdownMenuTrigger asChild>
|
||||||
className={cn(selectTriggerClassName, "w-auto gap-2")}
|
<Button size="sm" variant="outline" className="flex gap-2">
|
||||||
>
|
{t("notification.suspendTime.suspend")}
|
||||||
{t("notification.suspendTime.suspend")}
|
<LuChevronDown className="h-4 w-4 opacity-50" />
|
||||||
<LuChevronDown className="h-4 w-4 opacity-50" />
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent>
|
<DropdownMenuContent>
|
||||||
<DropdownMenuItem onClick={() => handleSuspend("5")}>
|
<DropdownMenuItem onClick={() => handleSuspend("5")}>
|
||||||
|
|||||||
@ -275,7 +275,7 @@ export default function LiveContextMenu({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("w-full", className)}>
|
<div className={cn("w-full", className)}>
|
||||||
<ContextMenu key={camera} modal={false} onOpenChange={handleOpenChange}>
|
<ContextMenu key={camera} onOpenChange={handleOpenChange}>
|
||||||
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
||||||
<ContextMenuContent>
|
<ContextMenuContent>
|
||||||
<div className="flex flex-col items-start gap-1 py-1 pl-2">
|
<div className="flex flex-col items-start gap-1 py-1 pl-2">
|
||||||
|
|||||||
@ -10,16 +10,16 @@ const SelectGroup = SelectPrimitive.Group;
|
|||||||
|
|
||||||
const SelectValue = SelectPrimitive.Value;
|
const SelectValue = SelectPrimitive.Value;
|
||||||
|
|
||||||
export const selectTriggerClassName =
|
|
||||||
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-background_alt [&>span]:line-clamp-1";
|
|
||||||
|
|
||||||
const SelectTrigger = React.forwardRef<
|
const SelectTrigger = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
||||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
||||||
>(({ className, children, ...props }, ref) => (
|
>(({ className, children, ...props }, ref) => (
|
||||||
<SelectPrimitive.Trigger
|
<SelectPrimitive.Trigger
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(selectTriggerClassName, className)}
|
className={cn(
|
||||||
|
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-background_alt [&>span]:line-clamp-1",
|
||||||
|
className,
|
||||||
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user