feat: assets
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 7.8 MiB |
+2
-1
@@ -39,7 +39,7 @@ import undo from './UI/undo.png'
|
|||||||
import focus from './UI/focus.png'
|
import focus from './UI/focus.png'
|
||||||
import picture from './UI/picture.png'
|
import picture from './UI/picture.png'
|
||||||
import screenshot from './UI/screenshot.png'
|
import screenshot from './UI/screenshot.png'
|
||||||
|
import writingMobileBackground from './UI/writingMobileBackground.png'
|
||||||
import android from './UI/android.png'
|
import android from './UI/android.png'
|
||||||
import ios from './UI/ios.png'
|
import ios from './UI/ios.png'
|
||||||
import web from './UI/web.png'
|
import web from './UI/web.png'
|
||||||
@@ -220,6 +220,7 @@ export const background = {
|
|||||||
playbackBG,
|
playbackBG,
|
||||||
playbackBG2,
|
playbackBG2,
|
||||||
libraryBG,
|
libraryBG,
|
||||||
|
writingMobileBackground,
|
||||||
libraryBgWeb: require('./UI/libraryBgWeb.png'),
|
libraryBgWeb: require('./UI/libraryBgWeb.png'),
|
||||||
libraryBG2,
|
libraryBG2,
|
||||||
libraryBG2Web: require('./UI/libraryBG2Web.png'),
|
libraryBG2Web: require('./UI/libraryBG2Web.png'),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { View } from 'react-native'
|
import { View } from 'react-native'
|
||||||
import { useIsFocused } from '@react-navigation/native'
|
import { useIsFocused, useRoute } from '@react-navigation/native'
|
||||||
import { background } from '../../assets'
|
import { background } from '../../assets'
|
||||||
import FullscreenIntroVideo from '../../components/FullscreenIntroVideo'
|
import FullscreenIntroVideo from '../../components/FullscreenIntroVideo'
|
||||||
import GradientButton from '../../components/GradientButton'
|
import GradientButton from '../../components/GradientButton'
|
||||||
@@ -15,16 +15,31 @@ import { isWeb } from '../../hooks/useLayoutType'
|
|||||||
const Compose = () => {
|
const Compose = () => {
|
||||||
const { videos } = useUserData()
|
const { videos } = useUserData()
|
||||||
const isFocused = useIsFocused()
|
const isFocused = useIsFocused()
|
||||||
|
const route = useRoute()
|
||||||
|
const fromLyrics = route?.params?.fromLyrics === true
|
||||||
|
|
||||||
const [videoUrl, setVideoUrl] = useState(null)
|
const [videoUrl, setVideoUrl] = useState(null)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setVideoUrl(isWeb ? videos.malikWeb : videos?.malik)
|
setVideoUrl(isWeb ? videos.malikWeb : videos?.malik)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
const handleBack = () => {
|
||||||
|
if (fromLyrics) {
|
||||||
|
navigate(Routes.BottomTab, {
|
||||||
|
screen: Routes.HomeStack,
|
||||||
|
params: {
|
||||||
|
screen: Routes.Home,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
goBack()
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Page backgroundImg={background.studioBG2} headerType="NONE">
|
<Page backgroundImg={background.studioBG2} headerType="NONE">
|
||||||
<MusicLandHeader
|
<MusicLandHeader
|
||||||
onPressBack={goBack}
|
onPressBack={handleBack}
|
||||||
progress={9}
|
progress={9}
|
||||||
// logo={icons.musicLandStudio}
|
// logo={icons.musicLandStudio}
|
||||||
/>
|
/>
|
||||||
@@ -38,7 +53,7 @@ const Compose = () => {
|
|||||||
>
|
>
|
||||||
<GradientButton
|
<GradientButton
|
||||||
title="Composer ma chanson"
|
title="Composer ma chanson"
|
||||||
onPress={() => navigate(Routes.ComposeSong)}
|
onPress={() => navigate(Routes.ComposeSong, fromLyrics ? { fromLyrics: true } : undefined)}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ const ComposeSong = () => {
|
|||||||
const [isConfirmVisible, setIsConfirmVisible] = useState(false)
|
const [isConfirmVisible, setIsConfirmVisible] = useState(false)
|
||||||
const [isProcessingConfirmation, setIsProcessingConfirmation] = useState(false)
|
const [isProcessingConfirmation, setIsProcessingConfirmation] = useState(false)
|
||||||
const isRegenerationFlow = route?.params?.isRegeneration === true
|
const isRegenerationFlow = route?.params?.isRegeneration === true
|
||||||
|
const fromLyrics = route?.params?.fromLyrics === true
|
||||||
|
|
||||||
const coinBalance = useMemo(() => {
|
const coinBalance = useMemo(() => {
|
||||||
const value = currentUserData?.coins
|
const value = currentUserData?.coins
|
||||||
@@ -221,6 +222,15 @@ const ComposeSong = () => {
|
|||||||
animated: true,
|
animated: true,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
if (fromLyrics) {
|
||||||
|
navigate(Routes.BottomTab, {
|
||||||
|
screen: Routes.HomeStack,
|
||||||
|
params: {
|
||||||
|
screen: Routes.Home,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
goBack()
|
goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ const ComposeSong = () => {
|
|||||||
const [isConfirmVisible, setIsConfirmVisible] = useState(false)
|
const [isConfirmVisible, setIsConfirmVisible] = useState(false)
|
||||||
const [isProcessingConfirmation, setIsProcessingConfirmation] = useState(false)
|
const [isProcessingConfirmation, setIsProcessingConfirmation] = useState(false)
|
||||||
const isRegenerationFlow = route?.params?.isRegeneration === true
|
const isRegenerationFlow = route?.params?.isRegeneration === true
|
||||||
|
const fromLyrics = route?.params?.fromLyrics === true
|
||||||
|
|
||||||
const coinBalance = useMemo(() => {
|
const coinBalance = useMemo(() => {
|
||||||
const value = currentUserData?.coins
|
const value = currentUserData?.coins
|
||||||
@@ -273,6 +274,15 @@ const ComposeSong = () => {
|
|||||||
if (selectedIndex > 0) {
|
if (selectedIndex > 0) {
|
||||||
setSelectedIndex((prev) => Math.max(prev - 1, 0))
|
setSelectedIndex((prev) => Math.max(prev - 1, 0))
|
||||||
} else {
|
} else {
|
||||||
|
if (fromLyrics) {
|
||||||
|
navigate(Routes.BottomTab, {
|
||||||
|
screen: Routes.HomeStack,
|
||||||
|
params: {
|
||||||
|
screen: Routes.Home,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
goBack()
|
goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ const CreateLyricsWithAi = () => {
|
|||||||
: parentLayout?.height
|
: parentLayout?.height
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerType="NONE" backgroundImg={background.writingBG}>
|
<Page headerType="NONE" backgroundImg={background.writingMobileBackground}>
|
||||||
<MusicLandHeader onPressBack={onPressBack} progress={progress} />
|
<MusicLandHeader onPressBack={onPressBack} progress={progress} />
|
||||||
<KeyboardAvoidingView
|
<KeyboardAvoidingView
|
||||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
||||||
|
|||||||
@@ -324,12 +324,15 @@ const Lyrics = ({ navigation }) => {
|
|||||||
const beatmakerStage = getStageAction('beatmaker', projectForStage)
|
const beatmakerStage = getStageAction('beatmaker', projectForStage)
|
||||||
setIsBlockingUI(false)
|
setIsBlockingUI(false)
|
||||||
if (hasExistingMusicDraft) {
|
if (hasExistingMusicDraft) {
|
||||||
navigate(Routes.ComposeSong, { isRegeneration: true })
|
navigate(Routes.ComposeSong, { isRegeneration: true, fromLyrics: true })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const handleNavigateToStudio = () => {
|
const handleNavigateToStudio = () => {
|
||||||
const targetRoute = beatmakerStage?.route || Routes.Compose
|
const targetRoute = beatmakerStage?.route || Routes.Compose
|
||||||
navigate(targetRoute, beatmakerStage?.params)
|
navigate(targetRoute, {
|
||||||
|
...(beatmakerStage?.params || {}),
|
||||||
|
fromLyrics: true,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
alert(
|
alert(
|
||||||
'Céline',
|
'Céline',
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const WritingLyrics = () => {
|
|||||||
}, [createNewProject, navigate, selectedProjectId, setIsLoading, updateProjectData])
|
}, [createNewProject, navigate, selectedProjectId, setIsLoading, updateProjectData])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page backgroundImg={isWeb ? background.libraryBgWeb : background.writingBG} headerType="NONE">
|
<Page backgroundImg={isWeb ? background.libraryBgWeb : background.writingMobileBackground} headerType="NONE">
|
||||||
<MusicLandHeader onPressBack={goBack} />
|
<MusicLandHeader onPressBack={goBack} />
|
||||||
<View style={styles.contentWrapper}>
|
<View style={styles.contentWrapper}>
|
||||||
<View style={styles.heroContainer}></View>
|
<View style={styles.heroContainer}></View>
|
||||||
|
|||||||
Reference in New Issue
Block a user