feat: refine creation and registration flows

This commit is contained in:
Sacha
2026-07-30 09:42:12 +02:00
parent 3fff09ba81
commit 761f3cc200
39 changed files with 1444 additions and 1239 deletions
+6 -15
View File
@@ -136,7 +136,7 @@ const getStageDescription = (key, metadata) => {
return 'Commencer la création de votre morceau'
case 'director':
if (!hasCover) {
return 'Générez une cover pour débloquer le playback'
return 'Validez votre pochette pour débloquer le playback'
}
if (isPlaybackGenerating) {
return 'Votre playback est en cours de préparation'
@@ -222,18 +222,17 @@ export const getStageAction = (key, project) => {
switch (key) {
case 'songwriter':
return {
route: getLyricsCount(project) > 0 ? Routes.Lyrics : Routes.WritingLyrics,
route: getLyricsCount(project) > 0 ? Routes.Lyrics : Routes.CreateLyricsWithAi,
}
case 'beatmaker': {
if (!project) {
return { route: Routes.Compose }
return { route: Routes.ComposeSong }
}
const musicStatus = project?.musicStatus || null
const songUrl = project?.songUrl || null
const coverStatus = project?.coverStatus || null
const cover = project?.cover || {}
const hasCoverBackground = !!cover?.generatedBackground
const hasCoverResult = !!cover?.result
const hasFinalCover = !!project?.coverUrl
@@ -245,26 +244,18 @@ export const getStageAction = (key, project) => {
if (musicStatus === 'GENERATED') {
return { route: Routes.SongReady }
}
return { route: Routes.Compose }
return { route: Routes.ComposeSong }
}
if (coverStatus === 'GENERATING') {
return { route: Routes.PouchReady }
}
if (!hasCoverBackground) {
if (!hasCoverResult) {
return { route: Routes.ChooseCoverType }
}
if (!hasCoverResult) {
return { route: Routes.PouchReady }
}
if (!hasFinalCover) {
return { route: Routes.ValidateCover }
}
return { route: Routes.ChooseCoverType }
return { route: hasFinalCover ? Routes.ChooseCoverType : Routes.PouchReady }
}
case 'director':
return {