diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c782fb32ff..6a0f447f13 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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, diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index fcf7ca693f..9bad7f208c 100755 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -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 diff --git a/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx b/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx index caec913f5e..d4404a0513 100644 --- a/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx +++ b/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx @@ -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 ? ( - - {t("notification.suspendTime.suspend")} - + + handleSuspend("5")}> diff --git a/web/src/components/menu/LiveContextMenu.tsx b/web/src/components/menu/LiveContextMenu.tsx index 00ac0e21a4..8694408d53 100644 --- a/web/src/components/menu/LiveContextMenu.tsx +++ b/web/src/components/menu/LiveContextMenu.tsx @@ -275,7 +275,7 @@ export default function LiveContextMenu({ return (
- + {children}
diff --git a/web/src/components/ui/select.tsx b/web/src/components/ui/select.tsx index b6959d38b6..8eabc46518 100644 --- a/web/src/components/ui/select.tsx +++ b/web/src/components/ui/select.tsx @@ -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, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( span]:line-clamp-1", + className, + )} {...props} > {children}