feat: confirm publish to youtube

This commit is contained in:
2025-11-17 11:25:14 +01:00
parent d2094b453e
commit 1a8fb9f1b5
2 changed files with 31 additions and 11 deletions
+9 -9
View File
@@ -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
);
}
}
@@ -243,14 +243,14 @@ const CreatingLyrics = ({ active, config, selections }) => {
alert(
"Brief à reformuler",
error.message,
__DEV__ ? error.message : "Une erreur s'est produite",
[
{
text: "OK",
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);