mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-21 03:41:55 +03:00
Review changes
This commit is contained in:
parent
bf25560067
commit
8f6e083420
@ -6,19 +6,8 @@
|
||||
"initializeCommand": ".devcontainer/initialize.sh",
|
||||
"postCreateCommand": ".devcontainer/post_create.sh",
|
||||
"overrideCommand": false,
|
||||
"remoteUser": "vscode",
|
||||
"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": {}
|
||||
},
|
||||
"remoteUser": "root",
|
||||
"features": {},
|
||||
"forwardPorts": [
|
||||
8971,
|
||||
5000,
|
||||
|
||||
@ -13,8 +13,12 @@ fi
|
||||
# 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
|
||||
# create the folders and give the host user permission to write to them.
|
||||
sudo mkdir -p /media/frigate
|
||||
sudo chown -R "$(id -u):$(id -g)" /media/frigate
|
||||
SUDO=""
|
||||
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
|
||||
# s6 service file. For dev, where frigate is started from an interactive
|
||||
|
||||
@ -42,7 +42,6 @@ import {
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { selectTriggerClassName } from "@/components/ui/select";
|
||||
import { formatUnixTimestampToDateTime } from "@/utils/dateUtil";
|
||||
import { use24HourTime } from "@/hooks/use-date-utils";
|
||||
import FilterSwitch from "@/components/filter/FilterSwitch";
|
||||
@ -816,11 +815,11 @@ export function CameraNotificationSwitch({
|
||||
|
||||
{!isSuspended ? (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger
|
||||
className={cn(selectTriggerClassName, "w-auto gap-2")}
|
||||
>
|
||||
{t("notification.suspendTime.suspend")}
|
||||
<LuChevronDown className="h-4 w-4 opacity-50" />
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button size="sm" variant="outline" className="flex gap-2">
|
||||
{t("notification.suspendTime.suspend")}
|
||||
<LuChevronDown className="h-4 w-4 opacity-50" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuItem onClick={() => handleSuspend("5")}>
|
||||
|
||||
@ -275,7 +275,7 @@ export default function LiveContextMenu({
|
||||
|
||||
return (
|
||||
<div className={cn("w-full", className)}>
|
||||
<ContextMenu key={camera} modal={false} onOpenChange={handleOpenChange}>
|
||||
<ContextMenu key={camera} onOpenChange={handleOpenChange}>
|
||||
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
||||
<ContextMenuContent>
|
||||
<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;
|
||||
|
||||
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<
|
||||
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
||||
>(({ className, children, ...props }, ref) => (
|
||||
<SelectPrimitive.Trigger
|
||||
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}
|
||||
>
|
||||
{children}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user