feat: refine creation and registration flows
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user