fix: video thumbnail availability (#421)
This commit is contained in:
@@ -22,7 +22,7 @@ exports[`ThumbnailWidget snapshots snapshots: renders as expected where thumbnai
|
||||
variant="light"
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="Select a video from your library to enable this feature"
|
||||
defaultMessage="Select a video from your library to enable this feature (applies only to courses that run on the edx.org site)."
|
||||
description="Message for unavailable thumbnail widget"
|
||||
id="authoring.videoeditor.thumbnail.unavailable.message"
|
||||
/>
|
||||
@@ -167,6 +167,15 @@ exports[`ThumbnailWidget snapshots snapshots: renders as expected with a thumbna
|
||||
id="authoring.videoeditor.thumbnail.error.fileSizeError"
|
||||
/>
|
||||
</ErrorAlert>
|
||||
<Alert
|
||||
variant="light"
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="Select a video from your library to enable this feature (applies only to courses that run on the edx.org site)."
|
||||
description="Message for unavailable thumbnail widget"
|
||||
id="authoring.videoeditor.thumbnail.unavailable.message"
|
||||
/>
|
||||
</Alert>
|
||||
<Stack
|
||||
direction="horizontal"
|
||||
gap={3}
|
||||
@@ -204,7 +213,7 @@ exports[`ThumbnailWidget snapshots snapshots: renders as expected with default p
|
||||
variant="light"
|
||||
>
|
||||
<FormattedMessage
|
||||
defaultMessage="Select a video from your library to enable this feature"
|
||||
defaultMessage="Select a video from your library to enable this feature (applies only to courses that run on the edx.org site)."
|
||||
description="Message for unavailable thumbnail widget"
|
||||
id="authoring.videoeditor.thumbnail.unavailable.message"
|
||||
/>
|
||||
|
||||
@@ -75,7 +75,7 @@ export const ThumbnailWidget = ({
|
||||
>
|
||||
<FormattedMessage {...messages.fileSizeError} />
|
||||
</ErrorAlert>
|
||||
{edxVideo ? null : (
|
||||
{(allowThumbnailUpload && edxVideo) ? null : (
|
||||
<Alert variant="light">
|
||||
<FormattedMessage {...messages.unavailableMessage} />
|
||||
</Alert>
|
||||
@@ -90,7 +90,7 @@ export const ThumbnailWidget = ({
|
||||
src={thumbnailSrc || thumbnail}
|
||||
alt={intl.formatMessage(messages.thumbnailAltText)}
|
||||
/>
|
||||
{ (allowThumbnailUpload && edxVideo) ? (
|
||||
{(allowThumbnailUpload && edxVideo) ? (
|
||||
<IconButtonWithTooltip
|
||||
tooltipPlacement="top"
|
||||
tooltipContent={intl.formatMessage(messages.deleteThumbnail)}
|
||||
@@ -115,7 +115,7 @@ export const ThumbnailWidget = ({
|
||||
iconBefore={FileUpload}
|
||||
onClick={fileInput.click}
|
||||
variant="link"
|
||||
disabled={!edxVideo}
|
||||
disabled={!(allowThumbnailUpload && edxVideo)}
|
||||
>
|
||||
<FormattedMessage {...messages.uploadButtonLabel} />
|
||||
</Button>
|
||||
|
||||
@@ -24,7 +24,8 @@ const messages = defineMessages({
|
||||
},
|
||||
unavailableMessage: {
|
||||
id: 'authoring.videoeditor.thumbnail.unavailable.message',
|
||||
defaultMessage: 'Select a video from your library to enable this feature',
|
||||
defaultMessage:
|
||||
'Select a video from your library to enable this feature (applies only to courses that run on the edx.org site).',
|
||||
description: 'Message for unavailable thumbnail widget',
|
||||
},
|
||||
uploadButtonLabel: {
|
||||
|
||||
Reference in New Issue
Block a user