feat: fixes

This commit is contained in:
2026-03-03 11:50:40 +01:00
parent ae93cd4521
commit 0ce69bc33b
4 changed files with 46 additions and 23 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ export const algoliaAppUrl = 'https://dashboard.algolia.com/apps'
export const musiclandProductionBaseUrl = 'https://musicland-one.vercel.app' export const musiclandProductionBaseUrl = 'https://musicland-one.vercel.app'
export const musiclandShareUrl = musiclandProductionBaseUrl export const musiclandShareUrl = musiclandProductionBaseUrl
export const musiclandShareHeading = 'Scannez le QR-code' export const musiclandShareHeading = "Partage l'expérience musicland"
export const musiclandShareMessage = export const musiclandShareMessage =
'Invite tes proches a decouvrir MusicLand et cree des experiences musicales ensemble.' 'Invite tes proches a decouvrir MusicLand et cree des experiences musicales ensemble.'
+1 -2
View File
@@ -566,7 +566,6 @@ const PlaybackDownload = ({ route }) => {
setIsLoading(false) setIsLoading(false)
} }
} }
const continueLabel = hasActiveSubscription ? 'Publier' : 'Publier sans générer de revenus'
return ( return (
<> <>
<FullscreenIntroVideo <FullscreenIntroVideo
@@ -649,7 +648,7 @@ const PlaybackDownload = ({ route }) => {
</View> </View>
<BorderGradientButton <BorderGradientButton
title={continueLabel} title={'Publier'}
onPress={() => { onPress={() => {
handlePublish() handlePublish()
}} }}
+38 -14
View File
@@ -23,6 +23,8 @@ import SpecificityContext from './SpecificityContext'
const { width: windowWidth } = Dimensions.get('window') const { width: windowWidth } = Dimensions.get('window')
const MAX_STEP_INDEX = 8 const MAX_STEP_INDEX = 8
const CUSTOM_SANITIZE_OPTIONS = { autoInjectPreChorus: false } const CUSTOM_SANITIZE_OPTIONS = { autoInjectPreChorus: false }
const CTA_BUTTON_HEIGHT = 50
const CTA_BUTTON_MAX_WIDTH = 500
const CreateLyricsWithAi = () => { const CreateLyricsWithAi = () => {
const { selectedProject } = useUser() const { selectedProject } = useUser()
@@ -338,6 +340,16 @@ const CreateLyricsWithAi = () => {
} }
}, [selectedIndex, parentLayout?.height]) }, [selectedIndex, parentLayout?.height])
const isCtaVisible = selectedIndex !== 8
const ctaBottomOffset = gutters
const ctaReservedSpace = isCtaVisible
? CTA_BUTTON_HEIGHT + ctaBottomOffset + gutters
: gutters
const contentHeight =
typeof parentLayout?.height === 'number'
? Math.max(0, parentLayout.height - ctaReservedSpace)
: parentLayout?.height
return ( return (
<Page headerType="NONE" backgroundImg={background.writingBG}> <Page headerType="NONE" backgroundImg={background.writingBG}>
<MusicLandHeader onPressBack={onPressBack} progress={progress} /> <MusicLandHeader onPressBack={onPressBack} progress={progress} />
@@ -345,12 +357,14 @@ const CreateLyricsWithAi = () => {
behavior={Platform.OS === 'ios' ? 'padding' : 'height'} behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={{ style={{
flex: 1, flex: 1,
paddingBottom: gutters,
gap: responsiveHeight(5), gap: responsiveHeight(5),
}} }}
keyboardVerticalOffset={Platform.OS === 'ios' ? 64 : 100} keyboardVerticalOffset={Platform.OS === 'ios' ? 64 : 100}
> >
<View style={{ flex: 1 }} onLayout={(e) => setparentLayout(e.nativeEvent.layout)}> <View
style={{ flex: 1, paddingBottom: ctaReservedSpace }}
onLayout={(e) => setparentLayout(e.nativeEvent.layout)}
>
<SwiperFlatList <SwiperFlatList
style={ style={
Platform.OS === 'web' Platform.OS === 'web'
@@ -364,7 +378,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -378,7 +392,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -387,7 +401,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -396,7 +410,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -410,7 +424,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -419,7 +433,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -428,7 +442,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -440,7 +454,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -449,7 +463,7 @@ const CreateLyricsWithAi = () => {
<View <View
style={{ style={{
width: containerWidth, width: containerWidth,
height: parentLayout?.height, height: contentHeight,
paddingHorizontal: gutters, paddingHorizontal: gutters,
}} }}
> >
@@ -474,14 +488,24 @@ const CreateLyricsWithAi = () => {
</View> </View>
</SwiperFlatList> </SwiperFlatList>
</View> </View>
{selectedIndex !== 8 && ( {isCtaVisible && (
<View
style={{
position: 'absolute',
left: gutters,
right: gutters,
bottom: ctaBottomOffset,
alignItems: 'center',
}}
>
<GradientButton <GradientButton
maxWidth={500} maxWidth={CTA_BUTTON_MAX_WIDTH}
title={selectedIndex === 7 ? 'Générer' : 'Suivant'} title={selectedIndex === 7 ? 'Générer' : 'Suivant'}
disabled={isNextDisabled} disabled={isNextDisabled}
onPress={onPressNext} onPress={onPressNext}
containerStyle={{ alignSelf: 'center', width: '100%' }} containerStyle={{ width: '100%' }}
/> />
</View>
)} )}
</KeyboardAvoidingView> </KeyboardAvoidingView>
</Page> </Page>
+1 -1
View File
@@ -150,7 +150,7 @@ const Goals = ({
return ( return (
<> <>
<View style={{ flex: 1, gap: 16, marginTop: 16 }}> <View style={{ flex: 1, gap: 16, marginTop: 16 }}>
<View style={{ flex: 1, gap: 10 }}> <View style={{ flex: 1, gap: 10, }}>
<CreateLyricsHeader title={strings.writing.steps.contextTitle} /> <CreateLyricsHeader title={strings.writing.steps.contextTitle} />
<View <View
style={{ flex: 1 }} style={{ flex: 1 }}