From b4b31794afccd8407df6c072231994ab3bc03fb4 Mon Sep 17 00:00:00 2001
From: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com>
Date: Thu, 3 Nov 2022 16:58:22 -0700
Subject: [PATCH] feat: allow license library content edit (#139)
* feat: allow license library content edit
---
.../LicenseWidget/LicenseDetails.jsx | 8 ++++----
.../LicenseWidget/LicenseSelector.jsx | 4 ++--
.../__snapshots__/LicenseDetails.test.jsx.snap | 18 +++++++++++++++++-
.../LicenseSelector.test.jsx.snap | 14 +++++++++++++-
4 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseDetails.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseDetails.jsx
index 83ceb8549..a0493ed22 100644
--- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseDetails.jsx
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseDetails.jsx
@@ -29,7 +29,7 @@ export const LicenseDetails = ({
// redux
updateField,
}) => (
- level === LicenseLevel.block && details && license !== 'select' ? (
+ level !== LicenseLevel.course && details && license !== 'select' ? (
@@ -81,7 +81,7 @@ export const LicenseDetails = ({
actions={(
updateField({
licenseDetails: {
...details,
@@ -116,7 +116,7 @@ export const LicenseDetails = ({
actions={(
updateField({
licenseDetails: {
...details,
@@ -152,7 +152,7 @@ export const LicenseDetails = ({
actions={(
updateField({
licenseDetails: {
...details,
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.jsx
index 5e54c381f..ced912c25 100644
--- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.jsx
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.jsx
@@ -37,7 +37,7 @@ export const LicenseSelector = ({
as="select"
ref={ref}
defaultValue={license}
- disabled={level !== LicenseLevel.block}
+ disabled={level === LicenseLevel.course}
floatingLabel={intl.formatMessage(messages.licenseTypeLabel)}
onChange={(e) => onLicenseChange(e.target.value)}
>
@@ -47,7 +47,7 @@ export const LicenseSelector = ({
return ();
})}
- {level === LicenseLevel.block ? (
+ {level !== LicenseLevel.course ? (
+
+
+
+
+
+
+`;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap
index 838820b4d..68a68af0d 100644
--- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap
@@ -104,7 +104,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with library l
@@ -124,6 +124,18 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with library l
Creative Commons
+
+ }
+ tooltipPlacement="top"
+ />