π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Tweak
Manav Rathibb6c2f165667
diff --git a/web/packages/gallery/components/viewer/FileViewer.tsx b/web/packages/gallery/components/viewer/FileViewer.tsxindex 91ba9de7a3..2e8e227192 100644--- a/web/packages/gallery/components/viewer/FileViewer.tsx+++ b/web/packages/gallery/components/viewer/FileViewer.tsx@@ -43,7 +43,13 @@ import EditIcon from "@mui/icons-material/Edit";import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";import { Button, Menu, MenuItem, styled, Typography } from "@mui/material";import { t } from "i18next";-import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import React, {+ useCallback,+ useEffect,+ useMemo,+ useRef,+ useState,+} from "react";import { fileInfoExifForFile, updateItemDataAlt } from "./data-source";import {FileViewerPhotoSwipe,@@ -606,33 +612,34 @@ const FileViewer: React.FC<FileViewerProps> = ({>{activeAnnotatedFile?.annotation.showDownload == "menu" && (<MoreMenuItem onClick={handleDownloadMenuAction}>- <Typography sx={{ fontWeight: "medium" }}>+ <MoreMenuItemTitle>{/*TODO */ t("download")}- </Typography>+ </MoreMenuItemTitle><FileDownloadOutlinedIcon /></MoreMenuItem>)}{activeAnnotatedFile?.annotation.showDelete && (<MoreMenuItem onClick={handleConfirmDelete}>- <Typography sx={{ fontWeight: "medium" }}>+ <MoreMenuItemTitle>{/*TODO */ t("delete")}- </Typography>+ </MoreMenuItemTitle><DeleteIcon /></MoreMenuItem>)}{activeAnnotatedFile?.annotation.showCopyImage && (<MoreMenuItem onClick={handleCopyImage}>- <Typography sx={{ fontWeight: "medium" }}>+ <MoreMenuItemTitle>{/*TODO */ pt("Copy image")}- </Typography>- <ContentCopyIcon />+ </MoreMenuItemTitle>+ {/* Tweak icon size to visually fit better with neighbours */}+ <ContentCopyIcon sx={{ "&&": { fontSize: "18px" } }} /></MoreMenuItem>)}{activeAnnotatedFile?.annotation.showEditImage && (<MoreMenuItem onClick={handleEditImage}>- <Typography sx={{ fontWeight: "medium" }}>+ <MoreMenuItemTitle>{/*TODO */ pt("Edit image")}- </Typography>+ </MoreMenuItemTitle><EditIcon /></MoreMenuItem>)}@@ -698,6 +705,10 @@ const MoreMenuItem = styled(MenuItem)`}`;+const MoreMenuItemTitle: React.FC<React.PropsWithChildren> = ({ children }) => (+ <Typography sx={{ fontWeight: "medium" }}>{children}</Typography>+);+const fileIsEditableImage = (file: EnteFile) => {// Only images are editable.if (file.metadata.fileType !== FileType.image) return false;