From e336513fad5bd5597c890b02deb20b4519013881 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 22 Dec 2025 17:40:41 +0000 Subject: feat: add a warning about viewing archives inline. fixes #2286 --- .../dashboard/preview/LinkContentSection.tsx | 31 +++++++++++++++++++++- apps/web/lib/i18n/client.ts | 2 ++ apps/web/lib/i18n/locales/en/translation.json | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/apps/web/components/dashboard/preview/LinkContentSection.tsx b/apps/web/components/dashboard/preview/LinkContentSection.tsx index 75b6df14..bdf5faf1 100644 --- a/apps/web/components/dashboard/preview/LinkContentSection.tsx +++ b/apps/web/components/dashboard/preview/LinkContentSection.tsx @@ -16,7 +16,7 @@ import { TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; -import { useTranslation } from "@/lib/i18n/client"; +import { Trans, useTranslation } from "@/lib/i18n/client"; import { useReaderSettings } from "@/lib/readerSettings"; import { AlertTriangle, @@ -24,6 +24,7 @@ import { BookOpen, Camera, ExpandIcon, + Info, Video, } from "lucide-react"; import { useSession } from "next-auth/react"; @@ -237,6 +238,34 @@ export default function LinkContentSection({ )} + {section === "archive" && ( + + +
+ +
+
+ +

+ + link + + ), + }} + /> +

+
+
+ )} {content} diff --git a/apps/web/lib/i18n/client.ts b/apps/web/lib/i18n/client.ts index 1c56a88a..0704ce87 100644 --- a/apps/web/lib/i18n/client.ts +++ b/apps/web/lib/i18n/client.ts @@ -4,6 +4,7 @@ import i18next from "i18next"; import resourcesToBackend from "i18next-resources-to-backend"; import { initReactI18next, + Trans as TransOrg, useTranslation as useTranslationOrg, } from "react-i18next"; @@ -30,4 +31,5 @@ i18next }); export const useTranslation = useTranslationOrg; +export const Trans = TransOrg; export const i18n = i18next; diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json index 08dc33e4..672d3e58 100644 --- a/apps/web/lib/i18n/locales/en/translation.json +++ b/apps/web/lib/i18n/locales/en/translation.json @@ -715,6 +715,7 @@ "view_original": "View Original", "cached_content": "Cached Content", "reader_view": "Reader View", + "archive_info": "Archives may not render correctly inline if they require Javascript. For best results, <1>download it and open in your browser.", "tabs": { "content": "Content", "details": "Details" -- cgit v1.2.3-70-g09d2