feat: assets

This commit is contained in:
2026-03-03 13:32:55 +01:00
parent e88ab1ed31
commit a09e21bd6b
8 changed files with 47 additions and 8 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 MiB

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