diff --git a/packages/common/src/services/remote-config/feature-flags.ts b/packages/common/src/services/remote-config/feature-flags.ts index 56f922f0cf1..3cf545da38f 100644 --- a/packages/common/src/services/remote-config/feature-flags.ts +++ b/packages/common/src/services/remote-config/feature-flags.ts @@ -54,7 +54,6 @@ export enum FeatureFlags { MANAGER_MODE = 'manager_mode', SEARCH_V2 = 'search_v2', PAYOUT_WALLET_ENABLED = 'payout_wallet_enabled', - EDIT_TRACK_REDESIGN = 'edit_track_redesign', SKIP_STREAM_CHECK = 'skip_stream_check', PREFETCH_STREAM_URLS = 'prefetch_stream_urls', HIDDEN_PAID_SCHEDULED = 'hidden_paid_scheduled', @@ -129,7 +128,6 @@ export const flagDefaults: FlagDefaults = { [FeatureFlags.MANAGER_MODE]: false, [FeatureFlags.SEARCH_V2]: false, [FeatureFlags.PAYOUT_WALLET_ENABLED]: false, - [FeatureFlags.EDIT_TRACK_REDESIGN]: false, [FeatureFlags.SKIP_STREAM_CHECK]: false, [FeatureFlags.PREFETCH_STREAM_URLS]: false, [FeatureFlags.HIDDEN_PAID_SCHEDULED]: false, diff --git a/packages/common/src/store/ui/modals/edit-track-modal/index.ts b/packages/common/src/store/ui/modals/edit-track-modal/index.ts deleted file mode 100644 index b11c9de2b10..00000000000 --- a/packages/common/src/store/ui/modals/edit-track-modal/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ID } from '~/models/Identifiers' -import { Nullable } from '~/utils/typeUtils' - -import { createModal } from '../createModal' - -export type EditTrackModalState = { - trackId: Nullable -} - -const editTrackModal = createModal({ - reducerPath: 'EditTrack', - initialState: { - isOpen: false, - trackId: null - }, - sliceSelector: (state) => state.ui.modals -}) - -export const { - hook: useEditTrackModal, - actions: editTrackModalActions, - reducer: editTrackModalReducer -} = editTrackModal - -export * as editTrackModalSelectors from './selectors' diff --git a/packages/common/src/store/ui/modals/edit-track-modal/selectors.ts b/packages/common/src/store/ui/modals/edit-track-modal/selectors.ts deleted file mode 100644 index b9a1b1e435d..00000000000 --- a/packages/common/src/store/ui/modals/edit-track-modal/selectors.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { StemTrack } from '~/models/Track' -import { cacheTracksSelectors } from '~/store/cache' -import { CommonState } from '~/store/commonStore' - -const { getTrack, getTracks } = cacheTracksSelectors - -export const getBaseState = (state: CommonState) => state.ui.modals.EditTrack - -export const getIsOpen = (state: CommonState) => getBaseState(state).isOpen -export const getTrackId = (state: CommonState) => getBaseState(state).trackId - -export const getMetadata = (state: CommonState) => { - const trackId = getTrackId(state) - return getTrack(state, { id: trackId }) -} - -export const getStems = (state: CommonState) => { - const trackId = getTrackId(state) - if (!trackId) return [] - - const track = getTrack(state, { id: trackId }) - if (!track?._stems?.length) return [] - - const stemIds = track._stems.map((s) => s.track_id) - - const stemsMap = getTracks(state, { ids: stemIds }) as { - [id: number]: StemTrack - } - const stems = Object.values(stemsMap).filter( - (t) => !t.is_delete && !t._marked_deleted - ) - return stems -} diff --git a/packages/common/src/store/ui/modals/index.ts b/packages/common/src/store/ui/modals/index.ts index 977703ea792..fcc1018cc8d 100644 --- a/packages/common/src/store/ui/modals/index.ts +++ b/packages/common/src/store/ui/modals/index.ts @@ -12,7 +12,6 @@ export * from './inbox-unavailable-modal' export * from './usdc-purchase-details-modal' export * from './usdc-transaction-details-modal' export * from './withdraw-usdc-modal' -export * from './edit-track-modal' export * from './premium-content-purchase-modal' export * from './usdc-manual-transfer-modal' export * from './add-funds-modal' diff --git a/packages/common/src/store/ui/modals/reducers.ts b/packages/common/src/store/ui/modals/reducers.ts index 9a998cd29ff..5a7ab67849e 100644 --- a/packages/common/src/store/ui/modals/reducers.ts +++ b/packages/common/src/store/ui/modals/reducers.ts @@ -6,7 +6,6 @@ import { artistPickModalReducer } from './artist-pick-modal' import { coinflowOnrampModalReducer } from './coinflow-onramp-modal' import { coinflowWithdrawModalReducer } from './coinflow-withdraw-modal' import { createChatModalReducer } from './create-chat-modal' -import { editTrackModalReducer } from './edit-track-modal' import { inboxUnavailableModalReducer } from './inbox-unavailable-modal' import { leavingAudiusModalReducer } from './leaving-audius-modal' import parentReducer, { initialState } from './parentSlice' @@ -34,7 +33,6 @@ const noOpReducers = Object.keys(initialState).reduce((prev, curr) => { */ const combinedReducers = combineReducers({ ...noOpReducers, - EditTrack: editTrackModalReducer, CreateChatModal: createChatModalReducer, InboxUnavailableModal: inboxUnavailableModalReducer, LeavingAudiusModal: leavingAudiusModalReducer, diff --git a/packages/common/src/store/ui/modals/types.ts b/packages/common/src/store/ui/modals/types.ts index 68461585204..58f8cca66f9 100644 --- a/packages/common/src/store/ui/modals/types.ts +++ b/packages/common/src/store/ui/modals/types.ts @@ -7,7 +7,6 @@ import { AlbumTrackRemoveConfirmationModalState } from './album-track-remove-con import { ArtistPickModalState } from './artist-pick-modal' import { CoinflowOnrampModalState } from './coinflow-onramp-modal' import { CoinflowWithdrawModalState } from './coinflow-withdraw-modal' -import { EditTrackModalState } from './edit-track-modal' import { InboxUnavailableModalState } from './inbox-unavailable-modal' import { LeavingAudiusModalState } from './leaving-audius-modal' import { PremiumContentPurchaseModalState } from './premium-content-purchase-modal' @@ -96,7 +95,6 @@ export type BasicModalsState = { export type StatefulModalsState = { CoinflowOnramp: CoinflowOnrampModalState CreateChatModal: CreateChatModalState - EditTrack: EditTrackModalState InboxUnavailableModal: InboxUnavailableModalState LeavingAudiusModal: LeavingAudiusModalState WithdrawUSDCModal: WithdrawUSDCModalState diff --git a/packages/web/src/app/web-player/WebPlayer.jsx b/packages/web/src/app/web-player/WebPlayer.jsx index 03c4feb1785..c72c94cb26a 100644 --- a/packages/web/src/app/web-player/WebPlayer.jsx +++ b/packages/web/src/app/web-player/WebPlayer.jsx @@ -416,13 +416,8 @@ class WebPlayer extends Component { } render() { - const { - incrementScroll, - decrementScroll, - userHandle, - isSearchV2Enabled, - isEditTrackRedesignEnabled - } = this.props + const { incrementScroll, decrementScroll, userHandle, isSearchV2Enabled } = + this.props const { showWebUpdateBanner, @@ -503,7 +498,6 @@ class WebPlayer extends Component { to={{ pathname: getPathname({ pathname: '' }) }} /> ))} - - )} /> - } /> - - - - )} /> - {/* Hash id routes */} - {/* Define profile page sub-routes before profile page itself. The rules for sub-routes would lose in a precedence fight with @@ -926,21 +912,14 @@ class WebPlayer extends Component { path={PROFILE_PAGE_AI_ATTRIBUTED_TRACKS} component={AiAttributedTracksPage} /> - - - {isEditTrackRedesignEnabled ? ( - ( - - )} - /> - ) : null} + ( + + )} + /> )} /> - )} /> - ({ accountStatus: getAccountStatus(state), signOnStatus: getSignOnStatus(state), showCookieBanner: getShowCookieBanner(state), - isSearchV2Enabled: getFeatureEnabled(FeatureFlags.SEARCH_V2), - isEditTrackRedesignEnabled: getFeatureEnabled( - FeatureFlags.EDIT_TRACK_REDESIGN - ) + isSearchV2Enabled: getFeatureEnabled(FeatureFlags.SEARCH_V2) }) const mapDispatchToProps = (dispatch) => ({ diff --git a/packages/web/src/common/store/cache/tracks/sagas.ts b/packages/web/src/common/store/cache/tracks/sagas.ts index 76ac4d6347c..79b85df48a5 100644 --- a/packages/web/src/common/store/cache/tracks/sagas.ts +++ b/packages/web/src/common/store/cache/tracks/sagas.ts @@ -202,12 +202,7 @@ function* editTrackAsync(action: ReturnType) { } } - const getFeatureEnabled = yield* getContext('getFeatureEnabled') - const isEditTrackRedesignEnabled = yield* call( - getFeatureEnabled, - FeatureFlags.EDIT_TRACK_REDESIGN - ) - if (isEditTrackRedesignEnabled && track.stems) { + if (track.stems) { const inProgressStemUploads = yield* select( getCurrentUploads, track.track_id diff --git a/packages/web/src/components/ai-attribution-modal/AiAttributionModal.tsx b/packages/web/src/components/ai-attribution-modal/AiAttributionModal.tsx index 4787f0b1790..0aeba255968 100644 --- a/packages/web/src/components/ai-attribution-modal/AiAttributionModal.tsx +++ b/packages/web/src/components/ai-attribution-modal/AiAttributionModal.tsx @@ -29,6 +29,7 @@ type AiAttributionModalProps = Omit & { onChange: (aiAttributedUserId: ID) => void } +// TODO: this is not being used anymore. Should we add it to edit page or remove it? export const AiAttributionModal = (props: AiAttributionModalProps) => { const { isOpen, onClose, onChange } = props const [isAttributable, toggleIsAttributable] = useToggle(false) diff --git a/packages/web/src/components/data-entry/AccessAndSaleTriggerLegacy.tsx b/packages/web/src/components/data-entry/AccessAndSaleTriggerLegacy.tsx deleted file mode 100644 index a7a4b1345ba..00000000000 --- a/packages/web/src/components/data-entry/AccessAndSaleTriggerLegacy.tsx +++ /dev/null @@ -1,385 +0,0 @@ -import { useMemo } from 'react' - -import { useUSDCPurchaseConfig } from '@audius/common/hooks' -import { - StreamTrackAvailabilityType, - isContentCollectibleGated, - isContentFollowGated, - isContentTipGated, - isContentUSDCPurchaseGated, - CollectibleGatedConditions, - FollowGatedConditions, - TipGatedConditions, - USDCPurchaseConditions, - AccessConditions, - Track -} from '@audius/common/models' -import { accountSelectors } from '@audius/common/store' -import { Nullable } from '@audius/common/utils' -import { - IconCollectible, - IconVisibilityHidden, - IconSpecialAccess, - IconVisibilityPublic, - IconCart, - Button -} from '@audius/harmony' -import { set, get } from 'lodash' -import { useSelector } from 'react-redux' -import { toFormikValidationSchema } from 'zod-formik-adapter' - -import { getCombinedDefaultGatedConditionValues } from 'components/edit/fields/helpers' -import { PriceAndAudienceMenuFields } from 'components/edit/fields/price-and-audience/PriceAndAudienceMenuFields' -import { priceAndAudienceSchema } from 'components/edit/fields/price-and-audience/priceAndAudienceSchema' -import { - AccessAndSaleFormValues, - DOWNLOAD_CONDITIONS, - FIELD_VISIBILITY, - GateKeeper, - IS_DOWNLOADABLE, - IS_DOWNLOAD_GATED, - IS_STREAM_GATED, - IS_UNLISTED, - LAST_GATE_KEEPER, - PREVIEW, - PRICE_HUMANIZED, - SPECIAL_ACCESS_TYPE, - STREAM_AVAILABILITY_TYPE, - STREAM_CONDITIONS, - SpecialAccessType -} from 'components/edit/fields/types' -import { defaultFieldVisibility } from 'pages/track-page/utils' - -import { ContextualMenu } from './ContextualMenu' - -const { getUserId } = accountSelectors - -const messages = { - title: 'Access & Sale', - description: - "Customize your music's availability for different audiences, and create personalized gated experiences for your fans.", - public: 'Public (Default)', - premium: 'Premium', - specialAccess: 'Special Access', - collectibleGated: 'Collectible Gated', - hidden: 'Hidden' -} - -enum GatedTrackMetadataField { - IS_STREAM_GATED = 'is_stream_gated', - STREAM_CONDITIONS = 'stream_conditions', - PREVIEW = 'preview_start_seconds', - IS_DOWNLOAD_GATED = 'is_download_gated', - DOWNLOAD_CONDITIONS = 'download_conditions', - IS_DOWNLOADABLE = 'is_downloadable' -} - -enum UnlistedTrackMetadataField { - SCHEDULED_RELEASE = 'scheduled_release', - UNLISTED = 'unlisted', - GENRE = 'genre', - MOOD = 'mood', - TAGS = 'tags', - SHARE = 'share', - PLAYS = 'plays' -} - -type TrackMetadataState = { - [GatedTrackMetadataField.IS_STREAM_GATED]: boolean - [GatedTrackMetadataField.STREAM_CONDITIONS]: Nullable - [GatedTrackMetadataField.PREVIEW]: Nullable - [GatedTrackMetadataField.IS_DOWNLOAD_GATED]: boolean - [GatedTrackMetadataField.DOWNLOAD_CONDITIONS]: Nullable - [GatedTrackMetadataField.IS_DOWNLOADABLE]: boolean - [UnlistedTrackMetadataField.SCHEDULED_RELEASE]: boolean - [UnlistedTrackMetadataField.UNLISTED]: boolean - [UnlistedTrackMetadataField.GENRE]: boolean - [UnlistedTrackMetadataField.MOOD]: boolean - [UnlistedTrackMetadataField.TAGS]: boolean - [UnlistedTrackMetadataField.SHARE]: boolean - [UnlistedTrackMetadataField.PLAYS]: boolean -} - -type AccessAndSaleTriggerLegacyProps = { - isRemix: boolean - isUpload: boolean - initialForm: Track - metadataState: TrackMetadataState - trackLength: number - didUpdateState: (newState: TrackMetadataState) => void - lastGateKeeper: GateKeeper - setLastGateKeeper: (value: GateKeeper) => void - forceOpen?: boolean - setForceOpen?: (value: boolean) => void -} - -export const AccessAndSaleTriggerLegacy = ( - props: AccessAndSaleTriggerLegacyProps -) => { - const { - isUpload, - isRemix, - initialForm, - metadataState, - trackLength, - didUpdateState, - lastGateKeeper, - setLastGateKeeper, - forceOpen, - setForceOpen - } = props - const initialStreamConditions = initialForm[STREAM_CONDITIONS] - const { - stream_conditions: savedStreamConditions, - unlisted: isUnlisted, - scheduled_release: isScheduledRelease, - is_stream_gated: isStreamGated, - preview_start_seconds: preview, - is_download_gated: isDownloadGated, - download_conditions: downloadConditions, - is_downloadable: isDownloadable, - ...fieldVisibility - } = metadataState - - /** - * Stream conditions from inside the modal. - * Upon submit, these values along with the selected access option will - * determine the final stream conditions that get saved to the track. - */ - const accountUserId = useSelector(getUserId) - const tempStreamConditions = useMemo( - () => ({ - ...getCombinedDefaultGatedConditionValues(accountUserId), - ...savedStreamConditions - }), - [accountUserId, savedStreamConditions] - ) - - const usdcPurchaseConfig = useUSDCPurchaseConfig() - - const initialValues: AccessAndSaleFormValues = useMemo(() => { - const isUsdcGated = isContentUSDCPurchaseGated(savedStreamConditions) - const isTipGated = isContentTipGated(savedStreamConditions) - const isFollowGated = isContentFollowGated(savedStreamConditions) - const isCollectibleGated = isContentCollectibleGated(savedStreamConditions) - - const initialValues = {} - set(initialValues, IS_UNLISTED, isUnlisted) - set(initialValues, IS_STREAM_GATED, isStreamGated) - set(initialValues, STREAM_CONDITIONS, tempStreamConditions) - set(initialValues, IS_DOWNLOAD_GATED, isDownloadGated) - set(initialValues, DOWNLOAD_CONDITIONS, downloadConditions) - set(initialValues, IS_DOWNLOADABLE, isDownloadable) - set(initialValues, LAST_GATE_KEEPER, lastGateKeeper ?? {}) - - let availabilityType = StreamTrackAvailabilityType.PUBLIC - if (isUsdcGated) { - availabilityType = StreamTrackAvailabilityType.USDC_PURCHASE - set( - initialValues, - PRICE_HUMANIZED, - tempStreamConditions.usdc_purchase.price - ? (Number(tempStreamConditions.usdc_purchase.price) / 100).toFixed(2) - : undefined - ) - } - if (isFollowGated || isTipGated) { - availabilityType = StreamTrackAvailabilityType.SPECIAL_ACCESS - } - if (isCollectibleGated) { - availabilityType = StreamTrackAvailabilityType.COLLECTIBLE_GATED - } - if (isUnlisted && !isScheduledRelease) { - availabilityType = StreamTrackAvailabilityType.HIDDEN - } - set(initialValues, STREAM_AVAILABILITY_TYPE, availabilityType) - set(initialValues, FIELD_VISIBILITY, fieldVisibility) - set(initialValues, PREVIEW, preview) - set( - initialValues, - SPECIAL_ACCESS_TYPE, - // Since we're in edit mode, we check if the track was initially tip gated - isTipGated || isContentTipGated(initialStreamConditions) - ? SpecialAccessType.TIP - : SpecialAccessType.FOLLOW - ) - return initialValues as AccessAndSaleFormValues - }, [ - savedStreamConditions, - isUnlisted, - isStreamGated, - tempStreamConditions, - isDownloadGated, - downloadConditions, - isDownloadable, - lastGateKeeper, - isScheduledRelease, - fieldVisibility, - preview, - initialStreamConditions - ]) - - const onSubmit = (values: AccessAndSaleFormValues) => { - const availabilityType = get(values, STREAM_AVAILABILITY_TYPE) - const preview = get(values, PREVIEW) - const specialAccessType = get(values, SPECIAL_ACCESS_TYPE) - const fieldVisibility = get(values, FIELD_VISIBILITY) - const streamConditions = get(values, STREAM_CONDITIONS) - const lastGateKeeper = get(values, LAST_GATE_KEEPER) - - let newState = { - ...metadataState, - ...defaultFieldVisibility, - remixes: fieldVisibility?.remixes ?? defaultFieldVisibility.remixes - } - newState.unlisted = isScheduledRelease ? isUnlisted : false - newState.is_stream_gated = false - newState.stream_conditions = null - newState.preview_start_seconds = null - - // For gated options, extract the correct stream conditions based on the selected availability type - switch (availabilityType) { - case StreamTrackAvailabilityType.USDC_PURCHASE: { - const conditions = { - // @ts-ignore splits get added in saga - usdc_purchase: { - price: Math.round( - (streamConditions as USDCPurchaseConditions).usdc_purchase.price - ) - } - } as USDCPurchaseConditions - newState.is_stream_gated = true - newState.stream_conditions = conditions - newState.preview_start_seconds = preview ?? 0 - newState.is_download_gated = true - newState.download_conditions = conditions - newState.is_downloadable = true - const downloadableGateKeeper = - isDownloadable && lastGateKeeper.downloadable === 'stemsAndDownloads' - ? 'stemsAndDownloads' - : 'accessAndSale' - setLastGateKeeper({ - ...lastGateKeeper, - access: 'accessAndSale', - downloadable: downloadableGateKeeper - }) - break - } - case StreamTrackAvailabilityType.SPECIAL_ACCESS: { - if (specialAccessType === SpecialAccessType.FOLLOW) { - const { follow_user_id } = streamConditions as FollowGatedConditions - newState.stream_conditions = { follow_user_id } - newState.download_conditions = { follow_user_id } - } else { - const { tip_user_id } = streamConditions as TipGatedConditions - newState.stream_conditions = { tip_user_id } - newState.download_conditions = { tip_user_id } - } - newState.is_stream_gated = true - newState.is_download_gated = true - setLastGateKeeper({ - ...lastGateKeeper, - access: 'accessAndSale' - }) - break - } - case StreamTrackAvailabilityType.COLLECTIBLE_GATED: { - const { nft_collection } = - streamConditions as CollectibleGatedConditions - newState.is_stream_gated = true - newState.stream_conditions = { nft_collection } - newState.is_download_gated = true - newState.download_conditions = { nft_collection } - setLastGateKeeper({ - ...lastGateKeeper, - access: 'accessAndSale' - }) - break - } - case StreamTrackAvailabilityType.HIDDEN: { - newState = { - ...newState, - ...(fieldVisibility ?? undefined), - remixes: fieldVisibility?.remixes ?? defaultFieldVisibility.remixes, - unlisted: true - } - if (lastGateKeeper.access === 'accessAndSale') { - newState.is_download_gated = false - newState.download_conditions = null - } - if (lastGateKeeper.downloadable === 'accessAndSale') { - newState.is_downloadable = false - } - break - } - case StreamTrackAvailabilityType.PUBLIC: { - if (lastGateKeeper.access === 'accessAndSale') { - newState.is_download_gated = false - newState.download_conditions = null - } - if (lastGateKeeper.downloadable === 'accessAndSale') { - newState.is_downloadable = false - } - break - } - } - - didUpdateState(newState) - } - - let availabilityButtonTitle = messages.public - let AvailabilityIcon = IconVisibilityPublic - if (isUnlisted && !isScheduledRelease) { - availabilityButtonTitle = messages.hidden - AvailabilityIcon = IconVisibilityHidden - } else if (isStreamGated) { - if (isContentUSDCPurchaseGated(savedStreamConditions)) { - availabilityButtonTitle = messages.premium - AvailabilityIcon = IconCart - } else if (isContentCollectibleGated(savedStreamConditions)) { - availabilityButtonTitle = messages.collectibleGated - AvailabilityIcon = IconCollectible - } else { - availabilityButtonTitle = messages.specialAccess - AvailabilityIcon = IconSpecialAccess - } - } - - return ( - } - initialValues={initialValues} - onSubmit={onSubmit} - validationSchema={toFormikValidationSchema( - priceAndAudienceSchema(trackLength, usdcPurchaseConfig) - )} - menuFields={ - - } - forceOpen={forceOpen} - setForceOpen={setForceOpen} - renderValue={() => null} - previewOverride={(toggleMenu) => ( - - )} - /> - ) -} diff --git a/packages/web/src/components/data-entry/FormTile.jsx b/packages/web/src/components/data-entry/FormTile.jsx deleted file mode 100644 index 3033953b4c1..00000000000 --- a/packages/web/src/components/data-entry/FormTile.jsx +++ /dev/null @@ -1,927 +0,0 @@ -import { Component, useState, useCallback } from 'react' - -import { createRemixOfMetadata } from '@audius/common/schemas' -import { - creativeCommons, - getCanonicalName, - GENRES, - convertGenreLabelToValue -} from '@audius/common/utils' -import { Button, Switch, IconIndent } from '@audius/harmony' -import cn from 'classnames' -import PropTypes from 'prop-types' -import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd' - -import { - AiAttributionModal, - AiAttributionButton -} from 'components/ai-attribution-modal' -import { MenuFormCallbackStatus } from 'components/data-entry/ContextualMenu' -import DropdownInput from 'components/data-entry/DropdownInput' -import Input from 'components/data-entry/Input' -import LabeledInput from 'components/data-entry/LabeledInput' -import TagInput from 'components/data-entry/TagInput' -import TextArea from 'components/data-entry/TextArea' -import Dropdown from 'components/navigation/Dropdown' -import ConnectedRemixSettingsModal from 'components/remix-settings-modal/ConnectedRemixSettingsModal' -import { RemixSettingsModalTrigger } from 'components/remix-settings-modal/RemixSettingsModalTrigger' -import PreviewButton from 'components/upload/PreviewButton' -import UploadArtwork from 'components/upload/UploadArtwork' -import { env } from 'services/env' -import { moodMap } from 'utils/Moods' -import { resizeImage } from 'utils/imageProcessingUtil' - -import { AccessAndSaleTriggerLegacy } from './AccessAndSaleTriggerLegacy' -import styles from './FormTile.module.css' -import { ReleaseDateTriggerLegacy } from './ReleaseDateTriggerLegacy' -import { StemsAndDownloadsTriggerLegacy } from './StemsAndDownloadsTriggerLegacy' - -const { - ALL_RIGHTS_RESERVED_TYPE, - computeLicense, - computeLicenseVariables, - getDescriptionForType -} = creativeCommons - -const MOODS = Object.keys(moodMap).map((k) => ({ text: k, el: moodMap[k] })) - -const messages = { - genre: 'Pick a Genre', - mood: 'Pick a Mood', - description: 'Description', - public: 'Public (Default)', - specialAccess: 'Special Access', - collectibleGated: 'Collectible Gated', - hidden: 'Hidden', - thisIsARemix: 'This is a Remix', - editRemix: 'Edit', - trackVisibility: 'Track Visibility', - availability: 'Availability' -} - -const Divider = (props) => { - return ( -
- {props.label ?
{props.label}
: null} -
-
- ) -} - -const BasicForm = (props) => { - const { - setRemixSettingsModalVisible, - aiAttributionModalVisible, - setAiAttributionModalVisible, - isRemix, - setIsRemix - } = props - - const onPreviewClick = props.playing - ? props.onStopPreview - : props.onPlayPreview - - const renderBasicForm = () => { - return ( -
-
- -
-
-
- - props.onChangeField( - props.isPlaylist ? 'playlist_name' : 'title', - value - ) - } - /> -
-
- - props.onChangeField('genre', convertGenreLabelToValue(value)) - } - size='large' - /> - props.onChangeField('mood', value)} - size='large' - /> -
-
- t)} - onChangeTags={(value) => - props.onChangeField('tags', [...value].join(',')) - } - /> -
-
-