end of tickets
This commit is contained in:
@@ -49,9 +49,6 @@ const ResearchHeader = ({
|
||||
<BlurView
|
||||
intensity={Platform.OS !== "ios" ? 10 : 20}
|
||||
style={styles.blurView}
|
||||
// experimentalBlurMethod={
|
||||
// Platform.OS !== "ios" ? "dimezisBlurView" : "none"
|
||||
// }
|
||||
>
|
||||
<Text style={styles.menu}>{item}</Text>
|
||||
</BlurView>
|
||||
|
||||
@@ -10,6 +10,7 @@ import { FONT_FAMILY } from "../../../styles/Fonts";
|
||||
import { getArtistDisplayName } from "../../../utils/artistName";
|
||||
import CreateLyricsHeader from "../../Writing/components/CreateLyricsHeader";
|
||||
import MusicCard from "./MusicCard";
|
||||
import { defaultAvatar } from "../../../data/data";
|
||||
|
||||
const EmptyText = ({ text }) => (
|
||||
<View style={{ flex: 1, alignItems: "center", paddingVertical: 16 }}>
|
||||
@@ -80,13 +81,13 @@ const SearchResultsList = ({
|
||||
...cover.options.flatMap((option) => [
|
||||
option?.finalUrl,
|
||||
option?.generatedUrl,
|
||||
])
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
return coverCandidates.find(isValid) || null;
|
||||
},
|
||||
[]
|
||||
[],
|
||||
);
|
||||
|
||||
const handleMusicPress = (project) => {
|
||||
@@ -164,7 +165,7 @@ const SearchResultsList = ({
|
||||
setShowMenu(
|
||||
(previous) =>
|
||||
!previous ||
|
||||
positionTop?.top !== (menuPosition?.top ?? null)
|
||||
positionTop?.top !== (menuPosition?.top ?? null),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -210,7 +211,7 @@ const SearchResultsList = ({
|
||||
setShowMenu(
|
||||
(previous) =>
|
||||
!previous ||
|
||||
positionTop?.top !== (menuPosition?.top ?? null)
|
||||
positionTop?.top !== (menuPosition?.top ?? null),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -249,12 +250,7 @@ const SearchResultsList = ({
|
||||
onPress={() => handleProfilePress(user.id)}
|
||||
>
|
||||
<ProfilePicture
|
||||
uri={
|
||||
user?.pictureUrl ||
|
||||
user?.profilePictureURL ||
|
||||
user?.photoURL ||
|
||||
null
|
||||
}
|
||||
uri={user?.profilePictureURL || defaultAvatar}
|
||||
size={60}
|
||||
imageProps={{ priority: "high" }}
|
||||
/>
|
||||
|
||||
@@ -197,7 +197,7 @@ const SongReady = () => {
|
||||
try {
|
||||
await pauseAllPlayers();
|
||||
} catch {}
|
||||
navigate(Routes.ComposeSong, { isRegeneration: true });
|
||||
navigate(Routes.Lyrics);
|
||||
};
|
||||
|
||||
const handleRegeneratePress = () => {
|
||||
|
||||
@@ -73,7 +73,7 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
});
|
||||
const sanitizedStructure = sanitizeStructureList(
|
||||
config?.structure,
|
||||
CUSTOM_SANITIZE_OPTIONS
|
||||
CUSTOM_SANITIZE_OPTIONS,
|
||||
);
|
||||
const callable = firebase
|
||||
.functions()
|
||||
@@ -136,7 +136,7 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
const rawMessage = typeof e?.message === "string" ? e.message : "";
|
||||
const cleanedMessage = rawMessage.replace(
|
||||
/^functions error: \w+-\w+:\s*/i,
|
||||
""
|
||||
"",
|
||||
);
|
||||
setError({
|
||||
message:
|
||||
@@ -166,7 +166,7 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
console.log("💾 [CreatingLyrics] Sauvegarde automatique des paroles");
|
||||
const sanitizedStructure = sanitizeStructureList(
|
||||
result?.structure || config?.structure,
|
||||
CUSTOM_SANITIZE_OPTIONS
|
||||
CUSTOM_SANITIZE_OPTIONS,
|
||||
);
|
||||
const baseConfig =
|
||||
config && typeof config === "object" && !Array.isArray(config)
|
||||
@@ -192,12 +192,12 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
if ("customStructure" in persistedSelections) {
|
||||
persistedSelections.customStructure = sanitizeStructureList(
|
||||
persistedSelections.customStructure,
|
||||
CUSTOM_SANITIZE_OPTIONS
|
||||
CUSTOM_SANITIZE_OPTIONS,
|
||||
);
|
||||
}
|
||||
if ("parsedStructure" in persistedSelections) {
|
||||
persistedSelections.parsedStructure = sanitizeStructureList(
|
||||
persistedSelections.parsedStructure
|
||||
persistedSelections.parsedStructure,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,7 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
onPress: redirect,
|
||||
},
|
||||
],
|
||||
{ cancelable: false }
|
||||
{ cancelable: false },
|
||||
);
|
||||
|
||||
if (Platform.OS === "web") {
|
||||
@@ -322,7 +322,7 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
setSaved(true);
|
||||
await setIsLoading(true);
|
||||
console.log(
|
||||
"📄 [CreatingLyrics] Consultation manuelle du texte"
|
||||
"📄 [CreatingLyrics] Consultation manuelle du texte",
|
||||
);
|
||||
await updateProjectData({
|
||||
title: result?.title || "",
|
||||
@@ -337,7 +337,7 @@ const CreatingLyrics = ({ active, config, selections }) => {
|
||||
} catch (e) {
|
||||
console.error(
|
||||
"⚠️ [CreatingLyrics] Erreur lors de l'ouverture manuelle",
|
||||
e
|
||||
e,
|
||||
);
|
||||
} finally {
|
||||
await setIsLoading(false);
|
||||
|
||||
@@ -37,6 +37,12 @@ const Lyrics = ({ navigation }) => {
|
||||
const [containerLayout, setContainerLayout] = useState(null);
|
||||
const { setIsLoading } = useMinuit();
|
||||
const { selectedProjectId, selectedProject } = useUser();
|
||||
const hasExistingMusicDraft = useMemo(() => {
|
||||
if (!Array.isArray(selectedProject?.musicUrls)) return false;
|
||||
return selectedProject.musicUrls.some(
|
||||
(url) => typeof url === "string" && url.trim()
|
||||
);
|
||||
}, [selectedProject?.musicUrls]);
|
||||
const [isFocus, setIsFocus] = useState(null);
|
||||
const [itemsContainerLayout, setItemsContainerLayout] = useState([]);
|
||||
const [sensitiveContentModal, setSensitiveContentModal] = useState({
|
||||
@@ -306,6 +312,14 @@ const Lyrics = ({ navigation }) => {
|
||||
}
|
||||
const beatmakerStage = getStageAction("beatmaker", projectForStage);
|
||||
await setIsLoading(false);
|
||||
if (hasExistingMusicDraft) {
|
||||
navigate(Routes.ComposeSong, { isRegeneration: true });
|
||||
return;
|
||||
}
|
||||
const handleNavigateToStudio = () => {
|
||||
const targetRoute = beatmakerStage?.route || Routes.Compose;
|
||||
navigate(targetRoute, beatmakerStage?.params);
|
||||
};
|
||||
alert(
|
||||
"Céline",
|
||||
"Bravo ! Vous venez de terminer de créer les paroles de votre musique ! Maintenant vous pouvez passer à la prochaine étape : le Studio pour donner vie à votre chanson !",
|
||||
@@ -323,10 +337,7 @@ const Lyrics = ({ navigation }) => {
|
||||
},
|
||||
{
|
||||
text: "Continuer vers le Studio",
|
||||
onPress: () => {
|
||||
const targetRoute = beatmakerStage?.route || Routes.Compose;
|
||||
navigate(targetRoute, beatmakerStage?.params);
|
||||
},
|
||||
onPress: handleNavigateToStudio,
|
||||
},
|
||||
]
|
||||
);
|
||||
@@ -350,6 +361,7 @@ const Lyrics = ({ navigation }) => {
|
||||
projectHasLyrics,
|
||||
projectLyrics,
|
||||
selectedProject,
|
||||
hasExistingMusicDraft,
|
||||
]);
|
||||
|
||||
const typeOccurrences = {};
|
||||
|
||||
Reference in New Issue
Block a user