enregistrer

This commit is contained in:
2025-09-03 10:02:09 +02:00
parent 4cabe4df3c
commit 5de9b347aa
3 changed files with 83 additions and 46 deletions
+5 -7
View File
@@ -20,15 +20,14 @@ const Playback = ({ route }) => {
const onPressRecord = useCallback(async () => {
try {
// If we lack required fields, skip generation but continue UX
if (!projectId || songIndex === undefined || !sunoTaskId) {
console.log("Missing data for timestamp generation", {
projectId,
songIndex,
sunoTaskId,
});
return;
// return navigate(Routes.RecordPlayback, { project });
}
if (project.musicTimeStamps.songIndex) {
console.log("exists");
return navigate(Routes.RecordPlayback, { project });
}
await setIsLoading(true);
const callable = firebase
@@ -59,7 +58,6 @@ const Playback = ({ route }) => {
}
}, [projectId, songIndex, sunoTaskId, project]);
console.log("Playback render", { projectId, songIndex, sunoTaskId });
return (
<Page headerType="NONE" backgroundImg={background.playbackBG2}>
<Image source={ai.john} style={styles.img} resizeMode="contain" />
+5 -2
View File
@@ -2,7 +2,7 @@ import { useFocusEffect } from "@react-navigation/native";
import { useAudioPlayer } from "expo-audio";
import { CameraView, useCameraPermissions } from "expo-camera";
import React, { useCallback, useEffect, useRef, useState } from "react";
import { Text, View } from "react-native";
import { Platform, Text, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import Svg, { Circle } from "react-native-svg";
import GradientButton from "../../components/GradientButton";
@@ -298,7 +298,10 @@ const RecordPlayback = ({ route }) => {
<MusicLandHeader progress={9} onPressBack={goBack} />
<View style={{ flex: 1, marginTop: 11 }}>
<CreateLyricsHeader>
<CreateLyricsHeader
disableBlur={Platform.OS !== "ios"}
containerStyle={{ backgroundColor: Palette.ultraLightBlack }}
>
<Text
style={{
fontSize: 16,
@@ -18,6 +18,7 @@ const CreateLyricsHeader = ({
onPress,
blurViewStyle = {},
showBorder = true,
disableBlur = false,
}) => {
const [onLayout, setOnLayout] = useState(null);
const { isWeb } = useLayoutType();
@@ -56,43 +57,78 @@ const CreateLyricsHeader = ({
setOnLayout(event.nativeEvent.layout);
}}
>
<BlurView
intensity={intensity}
tint={tint}
style={{
paddingHorizontal: 12,
paddingVertical: 8,
gap: 4,
...blurViewStyle,
}}
experimentalBlurMethod={
Platform.OS !== "ios" ? "dimezisBlurView" : "none"
}
>
{title && (
<Text
style={{
fontSize: 22,
color: Palette.white,
fontFamily: FONT_FAMILY.InterSemiBold,
}}
>
{title}
</Text>
)}
{subTitle && (
<Text
style={{
fontSize: 12,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
{subTitle}
</Text>
)}
{children}
</BlurView>
{disableBlur ? (
<View
style={{
paddingHorizontal: 12,
paddingVertical: 8,
gap: 4,
...blurViewStyle,
}}
>
{title && (
<Text
style={{
fontSize: 22,
color: Palette.white,
fontFamily: FONT_FAMILY.InterSemiBold,
}}
>
{title}
</Text>
)}
{subTitle && (
<Text
style={{
fontSize: 12,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
{subTitle}
</Text>
)}
{children}
</View>
) : (
<BlurView
intensity={intensity}
tint={tint}
style={{
paddingHorizontal: 12,
paddingVertical: 8,
gap: 4,
...blurViewStyle,
}}
experimentalBlurMethod={
Platform.OS !== "ios" ? "dimezisBlurView" : "none"
}
>
{title && (
<Text
style={{
fontSize: 22,
color: Palette.white,
fontFamily: FONT_FAMILY.InterSemiBold,
}}
>
{title}
</Text>
)}
{subTitle && (
<Text
style={{
fontSize: 12,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
{subTitle}
</Text>
)}
{children}
</BlurView>
)}
</View>
</Pressable>
);