From 962f4854230b0f5d6abfdcc4f644b0bfef7ff29d 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 e86234b1e90975de6e507a86549f0eb4600c723b 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 70e86905f..2846d53d7 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 &&

} - +