From 260e0ad4298963c879165cbec999177caf74af4a Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 23 Nov 2021 23:52:38 +0000 Subject: [PATCH 1/3] feat: original image url added to the side panel --- src/components/CaptureDetailDialog.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/CaptureDetailDialog.js b/src/components/CaptureDetailDialog.js index f008b33ae..737a23e3e 100644 --- a/src/components/CaptureDetailDialog.js +++ b/src/components/CaptureDetailDialog.js @@ -18,6 +18,7 @@ import OptimizedImage from './OptimizedImage'; import LinkToWebmap from './common/LinkToWebmap'; import { verificationStates } from '../common/variables'; import { CaptureDetailContext } from '../context/CaptureDetailContext'; +import { Link } from '@material-ui/core'; const useStyles = makeStyles((theme) => ({ chipRoot: { @@ -197,12 +198,30 @@ function CaptureDetailDialog(props) { }, { label: 'Created', value: dateCreated.toLocaleString() }, { label: 'Note', value: renderCapture.note }, + { + label: 'Original Image URL', + value: renderCapture.imageUrl, + copy: true, + link: true, + image: true, + }, ].map((item) => ( {item.label} {item.link ? ( - + // a link is either a GrowerID (item.image == false) or OriginalImage (item.image == true) + item.image ? ( + + Open in new tab + + ) : ( + + ) ) : ( item.value || '---' )} From bc7e8044c7a2c705d742e0f459f5bde107254329 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 24 Nov 2021 23:38:23 +0000 Subject: [PATCH 2/3] feat: added link over resized image --- src/components/CaptureDetailDialog.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/components/CaptureDetailDialog.js b/src/components/CaptureDetailDialog.js index 737a23e3e..0f7752180 100644 --- a/src/components/CaptureDetailDialog.js +++ b/src/components/CaptureDetailDialog.js @@ -72,6 +72,14 @@ const useStyles = makeStyles((theme) => ({ box: { padding: theme.spacing(4), }, + imageLink: { + position: 'absolute', + bottom: 0, + margin: '0 auto', + left: '50%', + transform: 'translate(-50%, -50%)', + color: '#fff', + }, })); function CaptureDetailDialog(props) { @@ -332,6 +340,14 @@ function CaptureDetailDialog(props) { style={{ maxWidth: '100%' }} fixed /> + + Open original image + Date: Mon, 6 Dec 2021 14:34:42 +0000 Subject: [PATCH 3/3] fix: removing image overlayed link --- src/components/CaptureDetailDialog.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/components/CaptureDetailDialog.js b/src/components/CaptureDetailDialog.js index 0f7752180..5991c7de8 100644 --- a/src/components/CaptureDetailDialog.js +++ b/src/components/CaptureDetailDialog.js @@ -340,14 +340,6 @@ function CaptureDetailDialog(props) { style={{ maxWidth: '100%' }} fixed /> - - Open original image -