From 30b33635363cd7695c849648590191121c5e8b32 Mon Sep 17 00:00:00 2001 From: Lukas Kalbertodt Date: Fri, 6 Sep 2024 10:18:33 +0200 Subject: [PATCH] Change icon for slide text match tooltip to `letter-text` Unfortunately, this required adding a new package. `react-icons` has a super old version of lucide icons, even in its newest version. Since almost all of our icons are from Lucide anyway, it makes sense to just use their packages directly. --- frontend/package-lock.json | 9 +++++++++ frontend/package.json | 1 + frontend/src/routes/Search.tsx | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 4aa07c702..fe609ff49 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -24,6 +24,7 @@ "hls.js": "^1.5.7", "i18next": "^23.10.0", "i18next-browser-languagedetector": "^7.2.0", + "lucide-react": "^0.439.0", "paella-basic-plugins": "1.44.10", "paella-core": "1.49.3", "paella-mp4multiquality-plugin": "1.47.1", @@ -6861,6 +6862,14 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.439.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.439.0.tgz", + "integrity": "sha512-PafSWvDTpxdtNEndS2HIHxcNAbd54OaqSYJO90/b63rab2HWYqDbH194j0i82ZFdWOAcf0AHinRykXRRK2PJbw==", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", diff --git a/frontend/package.json b/frontend/package.json index 09ac8ce88..3819a7947 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,6 +40,7 @@ "hls.js": "^1.5.7", "i18next": "^23.10.0", "i18next-browser-languagedetector": "^7.2.0", + "lucide-react": "^0.439.0", "paella-basic-plugins": "1.44.10", "paella-core": "1.49.3", "paella-mp4multiquality-plugin": "1.47.1", diff --git a/frontend/src/routes/Search.tsx b/frontend/src/routes/Search.tsx index d0a63de95..08be4a4b8 100644 --- a/frontend/src/routes/Search.tsx +++ b/frontend/src/routes/Search.tsx @@ -2,7 +2,6 @@ import { Trans, useTranslation } from "react-i18next"; import { graphql, PreloadedQuery, usePreloadedQuery, useQueryLoader } from "react-relay"; import { LuCalendarRange, - LuImage, LuLayout, LuLibrary, LuPlayCircle, @@ -10,6 +9,7 @@ import { LuVolume2, LuX, } from "react-icons/lu"; +import { LetterText } from "lucide-react"; import { IconType } from "react-icons"; import { ReactNode, RefObject, useEffect, useRef } from "react"; import { @@ -730,7 +730,7 @@ const TextMatchTooltip: React.FC = ({ previewImage, textM }}> {match(textMatch.ty, { CAPTION: () => , - SLIDE_TEXT: () => , + SLIDE_TEXT: () => , "%future added value": unreachable, })}