Skip to content

Commit 9be568d

Browse files
committed
edit images
1 parent fac618c commit 9be568d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/webapp/ui/src/eln/gallery/components/ActionsMenu.js

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import AlertContext, { mkAlert } from "../../../stores/contexts/Alert";
5656
import CardMedia from "@mui/material/CardMedia";
5757
import { useFolderOpen } from "./OpenFolderProvider";
5858
import { type URL } from "../../../util/types";
59+
import AnalyticsContext from "../../../stores/contexts/Analytics";
5960

6061
/**
6162
* When tapped, the user is presented with their operating system's file
@@ -282,6 +283,7 @@ function ActionsMenu({
282283
const selection = useGallerySelection();
283284
const theme = useTheme();
284285
const { addAlert } = React.useContext(AlertContext);
286+
const { trackEvent } = React.useContext(AnalyticsContext);
285287
const canPreviewAsImage = useImagePreviewOfGalleryFile();
286288
const canEditWithCollabora = useCollaboraEdit();
287289
const canEditWithOfficeOnline = useOfficeOnlineEdit();
@@ -770,6 +772,7 @@ function ActionsMenu({
770772
.elseThrow();
771773
await uploadFiles(idOfFolderThatFileIsIn, [newFile]);
772774
void refreshListing();
775+
trackEvent("user:edit:image:gallery");
773776
} catch (e) {
774777
addAlert(
775778
mkAlert({

0 commit comments

Comments
 (0)