diff --git a/packages/mobile/src/app/Drawers.tsx b/packages/mobile/src/app/Drawers.tsx index 32e2d49f089..a01b4d0f90f 100644 --- a/packages/mobile/src/app/Drawers.tsx +++ b/packages/mobile/src/app/Drawers.tsx @@ -19,6 +19,7 @@ import { EditCollectiblesDrawer } from 'app/components/edit-collectibles-drawer' import { EnablePushNotificationsDrawer } from 'app/components/enable-push-notifications-drawer' import { FeedFilterDrawer } from 'app/components/feed-filter-drawer' import { ForgotPasswordDrawer } from 'app/components/forgot-password-drawer' +import { GatedContentUploadPromptDrawer } from 'app/components/gated-content-upload-prompt-drawer/GatedContentUploadPromptDrawer' import { LockedContentDrawer } from 'app/components/locked-content-drawer' import { OverflowMenuDrawer } from 'app/components/overflow-menu-drawer' import { PlaybackRateDrawer } from 'app/components/playback-rate-drawer' @@ -115,6 +116,7 @@ const nativeDrawersMap: { [DrawerName in Drawer]?: ComponentType } = { RemoveDownloadedFavorites: RemoveDownloadedFavoritesDrawer, UnfavoriteDownloadedCollection: UnfavoriteDownloadedCollectionDrawer, LockedContent: LockedContentDrawer, + GatedContentUploadPrompt: GatedContentUploadPromptDrawer, ChatActions: ChatActionsDrawer, BlockMessages: BlockMessagesDrawer } diff --git a/packages/mobile/src/assets/images/iconRocket.svg b/packages/mobile/src/assets/images/iconRocket.svg new file mode 100644 index 00000000000..88accca541c --- /dev/null +++ b/packages/mobile/src/assets/images/iconRocket.svg @@ -0,0 +1,12 @@ + + + iconRocket + + + + + + + + + \ No newline at end of file diff --git a/packages/mobile/src/components/gated-content-upload-prompt-drawer/GatedContentUploadPromptDrawer.tsx b/packages/mobile/src/components/gated-content-upload-prompt-drawer/GatedContentUploadPromptDrawer.tsx new file mode 100644 index 00000000000..344505fb4a3 --- /dev/null +++ b/packages/mobile/src/components/gated-content-upload-prompt-drawer/GatedContentUploadPromptDrawer.tsx @@ -0,0 +1,147 @@ +import { useCallback } from 'react' + +import { TouchableOpacity, View } from 'react-native' +import { useDispatch } from 'react-redux' + +import IconArrow from 'app/assets/images/iconArrow.svg' +import IconExternalLink from 'app/assets/images/iconExternalLink.svg' +import IconRocket from 'app/assets/images/iconRocket.svg' +import { Button, Text, useLink } from 'app/components/core' +import { NativeDrawer } from 'app/components/drawer' +import { useNavigation } from 'app/hooks/useNavigation' +import { setVisibility } from 'app/store/drawers/slice' +import { flexRowCentered, makeStyles } from 'app/styles' +import { useColor } from 'app/utils/theme' + +const LEARN_MORE_URL = + 'https://blog.audius.co/guide-to-audius-availability-settings' + +const messages = { + title: 'NEW UPDATE!', + subtitle: 'Control who has access to your tracks!', + description: + 'Availability settings allow you to limit access to specific groups of users or offer exclusive content to your most dedicated fans.', + learnMore: 'Learn More', + gotIt: 'Got It', + checkItOut: 'Check It Out' +} + +const useStyles = makeStyles(({ spacing, palette, typography }) => ({ + drawer: { + marginVertical: spacing(8), + marginHorizontal: spacing(4), + alignItems: 'flex-start' + }, + titleContainer: { + ...flexRowCentered(), + justifyContent: 'center', + width: '100%', + paddingBottom: spacing(4), + marginBottom: spacing(6), + borderBottomWidth: 1, + borderBottomColor: palette.neutralLight8 + }, + titleText: { + marginLeft: spacing(3), + fontFamily: typography.fontByWeight.heavy, + fontSize: typography.fontSize.medium, + color: palette.neutralLight4 + }, + subtitle: { + marginBottom: spacing(6), + fontFamily: typography.fontByWeight.bold, + fontSize: typography.fontSize.large + }, + description: { + marginBottom: spacing(6), + fontFamily: typography.fontByWeight.medium, + fontSize: typography.fontSize.large, + lineHeight: spacing(7) + }, + button: { + marginBottom: spacing(6) + }, + buttonText: { + fontSize: typography.fontSize.large + }, + learnMore: { + ...flexRowCentered(), + marginBottom: spacing(6) + }, + learnMoreIcon: { + marginLeft: spacing(1) + } +})) + +export const GatedContentUploadPromptDrawer = ({ + isUpload +}: { + isUpload?: boolean +}) => { + const styles = useStyles() + const neutralLight4 = useColor('neutralLight4') + const navigation = useNavigation() + const dispatch = useDispatch() + const { onPress: onLearnMorePress } = useLink(LEARN_MORE_URL) + + const handleClose = useCallback(() => { + dispatch( + setVisibility({ drawer: 'GatedContentUploadPrompt', visible: false }) + ) + }, [dispatch]) + + const handleSubmit = useCallback(() => { + handleClose() + navigation.push('Availability') + }, [handleClose, navigation]) + + if (!isUpload) return null + + return ( + + + + + + {messages.title} + + + {messages.subtitle} + {messages.description} + + + {messages.learnMore} + + + +