From d72c04a88e97363e964c7a95fe31c71b705a563b Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Nov 2019 11:39:07 +0100 Subject: [PATCH] [Glitch] Change media description label to be context-sensitive Port ed940a3a4a94f601d43d634d7f3fbcbd636e5b9c to glitch-soc Signed-off-by: Thibaut Girka --- .../features/ui/components/focal_point_modal.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js index 70e86905f7..2846d53d7d 100644 --- a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js @@ -244,6 +244,16 @@ class FocalPointModal extends ImmutablePureComponent { const previewWidth = 200; const previewHeight = previewWidth / previewRatio; + let descriptionLabel = null; + + if (media.get('type') === 'audio') { + descriptionLabel = ; + } else if (media.get('type') === 'video') { + descriptionLabel = ; + } else { + descriptionLabel = ; + } + return (
@@ -255,7 +265,9 @@ class FocalPointModal extends ImmutablePureComponent {
{focals &&

} - +