From 9893741990cd17c9f6f90afb62f1d9da17db5567 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 27 Feb 2024 20:40:57 -0700 Subject: [PATCH] Update tailwind css and cleanup classNames (#10107) * Bump tailwindcss from 3.3.5 to 3.4.1 in /web Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.3.5 to 3.4.1. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.3.5...v3.4.1) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update tailwind css and cleanup --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/package-lock.json | 8 +- web/package.json | 2 +- web/src/App.tsx | 4 +- web/src/components/card/MiniEventCard.tsx | 83 ------------------- .../image/AnimatedEventThumbnail.tsx | 4 +- web/src/components/navigation/Bottombar.tsx | 2 +- web/src/components/navigation/NavItem.tsx | 2 +- web/src/components/navigation/Sidebar.tsx | 2 +- web/src/components/player/LivePlayer.tsx | 14 ++-- web/src/pages/Live.tsx | 6 +- web/src/views/events/DesktopRecordingView.tsx | 6 +- web/src/views/events/EventView.tsx | 23 +++-- 12 files changed, 35 insertions(+), 121 deletions(-) delete mode 100644 web/src/components/card/MiniEventCard.tsx diff --git a/web/package-lock.json b/web/package-lock.json index dc054aa79..34b159fa1 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -90,7 +90,7 @@ "msw": "^2.2.1", "postcss": "^8.4.32", "prettier": "^3.2.5", - "tailwindcss": "^3.3.5", + "tailwindcss": "^3.4.1", "typescript": "^5.2.2", "vite": "^5.1.4", "vitest": "^1.3.1" @@ -7618,9 +7618,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz", - "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", + "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", diff --git a/web/package.json b/web/package.json index 5a5bf2f8f..ebdb6dceb 100644 --- a/web/package.json +++ b/web/package.json @@ -95,7 +95,7 @@ "msw": "^2.2.1", "postcss": "^8.4.32", "prettier": "^3.2.5", - "tailwindcss": "^3.3.5", + "tailwindcss": "^3.4.1", "typescript": "^5.2.2", "vite": "^5.1.4", "vitest": "^1.3.1" diff --git a/web/src/App.tsx b/web/src/App.tsx index 9b5c2b401..9bbb666f8 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -21,13 +21,13 @@ function App() { -
+
{isDesktop && } {isDesktop && } {isMobile && }
} /> diff --git a/web/src/components/card/MiniEventCard.tsx b/web/src/components/card/MiniEventCard.tsx deleted file mode 100644 index 2794255eb..000000000 --- a/web/src/components/card/MiniEventCard.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { useApiHost } from "@/api"; -import { Card } from "../ui/card"; -import { Event as FrigateEvent } from "@/types/event"; -import { LuClock, LuStar } from "react-icons/lu"; -import { useCallback } from "react"; -import TimeAgo from "../dynamic/TimeAgo"; -import { HiOutlineVideoCamera } from "react-icons/hi"; -import { MdOutlineLocationOn } from "react-icons/md"; -import axios from "axios"; - -type MiniEventCardProps = { - event: FrigateEvent; - onUpdate?: () => void; -}; - -export default function MiniEventCard({ event, onUpdate }: MiniEventCardProps) { - const baseUrl = useApiHost(); - const onSave = useCallback( - async (e: Event) => { - e.stopPropagation(); - let response; - if (!event.retain_indefinitely) { - response = await axios.post(`events/${event.id}/retain`); - } else { - response = await axios.delete(`events/${event.id}/retain`); - } - if (response.status === 200 && onUpdate) { - onUpdate(); - } - }, - [event] - ); - - return ( - -
-
- onSave(e)} - fill={event.retain_indefinitely ? "currentColor" : "none"} - /> - {event.end_time ? null : ( -
- In progress -
- )} -
-
-
- {event.label.replaceAll("_", " ")} - {event.sub_label - ? `: ${event.sub_label.replaceAll("_", " ")}` - : null} -
-
-
- -
- -
-
-
- - {event.camera.replaceAll("_", " ")} -
- {event.zones.length ? ( -
- - {event.zones.join(", ").replaceAll("_", " ")} -
- ) : null} -
-
-
-
- ); -} diff --git a/web/src/components/image/AnimatedEventThumbnail.tsx b/web/src/components/image/AnimatedEventThumbnail.tsx index 347138b0b..9d12f7e15 100644 --- a/web/src/components/image/AnimatedEventThumbnail.tsx +++ b/web/src/components/image/AnimatedEventThumbnail.tsx @@ -41,8 +41,8 @@ export function AnimatedEventThumbnail({ event }: AnimatedEventThumbnailProps) { aspectRatio: aspectRatio, }} > -
-
+
+
diff --git a/web/src/components/navigation/Bottombar.tsx b/web/src/components/navigation/Bottombar.tsx index d2ba42c63..1f82e4b32 100644 --- a/web/src/components/navigation/Bottombar.tsx +++ b/web/src/components/navigation/Bottombar.tsx @@ -4,7 +4,7 @@ import SettingsNavItems from "../settings/SettingsNavItems"; function Bottombar() { return ( -
+
{navbarLinks.map((item) => ( - + diff --git a/web/src/components/navigation/Sidebar.tsx b/web/src/components/navigation/Sidebar.tsx index 131963118..201a3fe83 100644 --- a/web/src/components/navigation/Sidebar.tsx +++ b/web/src/components/navigation/Sidebar.tsx @@ -5,7 +5,7 @@ import NavItem from "./NavItem"; function Sidebar() { return ( -