diff --git a/web/public/locales/en/views/exports.json b/web/public/locales/en/views/exports.json index 729899443..4a79d20e1 100644 --- a/web/public/locales/en/views/exports.json +++ b/web/public/locales/en/views/exports.json @@ -9,6 +9,12 @@ "desc": "Enter a new name for this export.", "saveExport": "Save Export" }, + "tooltip": { + "shareExport": "Share export", + "downloadVideo": "Download video", + "editName": "Edit name", + "deleteExport": "Delete export" + }, "toast": { "error": { "renameExportFailed": "Failed to rename export: {{errorMessage}}" diff --git a/web/src/components/card/ExportCard.tsx b/web/src/components/card/ExportCard.tsx index d57a30b52..d95c6f318 100644 --- a/web/src/components/card/ExportCard.tsx +++ b/web/src/components/card/ExportCard.tsx @@ -4,7 +4,6 @@ import { Button } from "../ui/button"; import { useCallback, useState } from "react"; import { isDesktop, isMobile } from "react-device-detect"; import { FaDownload, FaPlay, FaShareAlt } from "react-icons/fa"; -import Chip from "../indicators/Chip"; import { Skeleton } from "../ui/skeleton"; import { Dialog, @@ -22,6 +21,8 @@ import { cn } from "@/lib/utils"; import { shareOrCopy } from "@/utils/browserUtil"; import { useTranslation } from "react-i18next"; import { ImageShadowOverlay } from "../overlay/ImageShadowOverlay"; +import BlurredIconButton from "../button/BlurredIconButton"; +import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip"; type ExportProps = { className: string; @@ -156,56 +157,77 @@ export default function ExportCard({ )} {hovered && ( -
+ <>
-
- {!exportedRecording.in_progress && ( - - shareOrCopy( - `${baseUrl}export?id=${exportedRecording.id}`, - exportedRecording.name.replaceAll("_", " "), - ) - } - > - - - )} - {!exportedRecording.in_progress && ( - - - - - - )} - {!exportedRecording.in_progress && ( - - setEditName({ - original: exportedRecording.name, - update: undefined, - }) - } - > - - - )} - - onDelete({ - file: exportedRecording.id, - exportName: exportedRecording.name, - }) - } - > - - +
+
+ {!exportedRecording.in_progress && ( + + + + shareOrCopy( + `${baseUrl}export?id=${exportedRecording.id}`, + exportedRecording.name.replaceAll("_", " "), + ) + } + > + + + + {t("tooltip.shareExport")} + + )} + {!exportedRecording.in_progress && ( + + + + + + + + + {t("tooltip.downloadVideo")} + + + + )} + {!exportedRecording.in_progress && ( + + + + setEditName({ + original: exportedRecording.name, + update: undefined, + }) + } + > + + + + {t("tooltip.editName")} + + )} + + + + onDelete({ + file: exportedRecording.id, + exportName: exportedRecording.name, + }) + } + > + + + + {t("tooltip.deleteExport")} + +
{!exportedRecording.in_progress && ( @@ -220,13 +242,13 @@ export default function ExportCard({ )} -
+ )} {loading && ( )} -
+
{exportedRecording.name.replaceAll("_", " ")}