From bbe18d5d6bc83c24667d2e7eb442e0b3186617c3 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 4 Dec 2025 10:32:45 -0700 Subject: [PATCH] Don't show admin action buttons on export card --- web/src/components/card/ExportCard.tsx | 36 ++++++++++++++------------ 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/web/src/components/card/ExportCard.tsx b/web/src/components/card/ExportCard.tsx index d95c6f318..021524532 100644 --- a/web/src/components/card/ExportCard.tsx +++ b/web/src/components/card/ExportCard.tsx @@ -23,6 +23,7 @@ import { useTranslation } from "react-i18next"; import { ImageShadowOverlay } from "../overlay/ImageShadowOverlay"; import BlurredIconButton from "../button/BlurredIconButton"; import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip"; +import { useIsAdmin } from "@/hooks/use-is-admin"; type ExportProps = { className: string; @@ -40,6 +41,7 @@ export default function ExportCard({ onDelete, }: ExportProps) { const { t } = useTranslation(["views/exports"]); + const isAdmin = useIsAdmin(); const [hovered, setHovered] = useState(false); const [loading, setLoading] = useState( exportedRecording.thumb_path.length > 0, @@ -195,7 +197,7 @@ export default function ExportCard({ )} - {!exportedRecording.in_progress && ( + {isAdmin && !exportedRecording.in_progress && ( {t("tooltip.editName")} )} - - - - onDelete({ - file: exportedRecording.id, - exportName: exportedRecording.name, - }) - } - > - - - - {t("tooltip.deleteExport")} - + {isAdmin && ( + + + + onDelete({ + file: exportedRecording.id, + exportName: exportedRecording.name, + }) + } + > + + + + {t("tooltip.deleteExport")} + + )}