Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

feat: require edit before allowing save

httpjamesme7dde6f530c7
diff --git a/apps/photos/public/locales/en/translation.json b/apps/photos/public/locales/en/translation.json
index 11335627de..beb8722fe9 100644
--- a/apps/photos/public/locales/en/translation.json
+++ b/apps/photos/public/locales/en/translation.json
@@ -626,5 +626,6 @@
"INDEXED_ITEMS": "Indexed items",
"CACHE_DIRECTORY": "Cache folder",
"FREEHAND": "Freehand",
- "APPLY": "Apply"
+ "APPLY": "Apply",
+ "PHOTO_EDIT_REQUIRED_TO_SAVE": "At least one transformation or color adjustment must be performed before saving."
}
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
index 2e0c2cdbf5..1e849b8392 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
@@ -783,14 +783,25 @@ const ImageEditorOverlay = (props: IProps) => {
startIcon={<DownloadIcon />}
onClick={downloadEditedPhoto}
label={t('DOWNLOAD_EDITED')}
+ disabled={
+ !transformationPerformed && !coloursAdjusted
+ }
/>
<MenuItemDivider />
<EnteMenuItem
startIcon={<CloudUploadIcon />}
onClick={saveCopyToEnte}
label={t('SAVE_A_COPY_TO_ENTE')}
+ disabled={
+ !transformationPerformed && !coloursAdjusted
+ }
/>
</MenuItemGroup>
+ {!transformationPerformed && !coloursAdjusted && (
+ <MenuSectionTitle
+ title={t('PHOTO_EDIT_REQUIRED_TO_SAVE')}
+ />
+ )}
</EnteDrawer>
</Backdrop>
</>