new background and fixs
This commit is contained in:
@@ -68,13 +68,13 @@ exports.generatePicturePrompt = (project = {}) => {
|
|||||||
<STYLE>${styleLine}</STYLE>
|
<STYLE>${styleLine}</STYLE>
|
||||||
<COMPOSITION>La composition doit être dynamique et remplir toute la surface, sans laisser de bordures ni de zones vides.</COMPOSITION>
|
<COMPOSITION>La composition doit être dynamique et remplir toute la surface, sans laisser de bordures ni de zones vides.</COMPOSITION>
|
||||||
<TYPOGRAPHIE>Intègre de manière artistique et lisible le titre de la chanson ${title || "Sans titre"}. La typographie doit compléter le style abstrait et lumineux de la pochette. Priorise la lisibilité.</TYPOGRAPHIE>
|
<TYPOGRAPHIE>Intègre de manière artistique et lisible le titre de la chanson ${title || "Sans titre"}. La typographie doit compléter le style abstrait et lumineux de la pochette. Priorise la lisibilité.</TYPOGRAPHIE>
|
||||||
<LOGO_RESERVE>Réserve un espace net et dégagé en bas à droite, occupant environ 25% de la largeur totale. Cette zone doit être légèrement plus sombre ou avoir un contraste suffisant.</LOGO_RESERVE>
|
<LOGO_RESERVE>Crée un espace vide et propre en bas à droite (25% de la largeur), sans texte, logo ou marquage. Cet espace servira à insérer un logo plus tard manuellement.</LOGO_RESERVE>
|
||||||
</CONTEXTES_VISUELS>
|
</CONTEXTES_VISUELS>
|
||||||
|
|
||||||
<CONTRAINTES>
|
<CONTRAINTES>
|
||||||
<INTERDIT>Personnes, visages ou silhouettes reconnaissables.</INTERDIT>
|
<INTERDIT>Personnes, visages ou silhouettes reconnaissables.</INTERDIT>
|
||||||
<INTERDIT>Fonds blancs ou bordures délimitant l'image.</INTERDIT>
|
<INTERDIT>Fonds blancs ou bordures délimitant l'image.</INTERDIT>
|
||||||
<INTERDIT>Tout autre logo, filigrane ou texte promotionnel que le titre, l'artiste et la zone réservée pour "MusicLand Production".</INTERDIT>
|
<INTERDIT>Tout texte promotionnel, filigrane ou logo (y compris "MusicLand Production").</INTERDIT>
|
||||||
<INTERDIT>Texte illisible ou trop petit.</INTERDIT>
|
<INTERDIT>Texte illisible ou trop petit.</INTERDIT>
|
||||||
</CONTRAINTES>
|
</CONTRAINTES>
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1004 KiB After Width: | Height: | Size: 35 MiB |
@@ -73,7 +73,7 @@ const MusicLandHeader = ({
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
<Image
|
<Image
|
||||||
source={logo || icons.musicLandLogo}
|
source={logo}
|
||||||
style={{
|
style={{
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
height: isWeb ? 150 : 100,
|
height: isWeb ? 150 : 100,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Image, StyleSheet, View } from "react-native";
|
import { Image, StyleSheet, View } from "react-native";
|
||||||
import { ai, background, icons } from "../../assets";
|
import { ai, background } from "../../assets";
|
||||||
import FullscreenIntroVideo from "../../components/FullscreenIntroVideo";
|
import FullscreenIntroVideo from "../../components/FullscreenIntroVideo";
|
||||||
import GradientButton from "../../components/GradientButton";
|
import GradientButton from "../../components/GradientButton";
|
||||||
import MusicLandHeader from "../../components/MusicLandHeader";
|
import MusicLandHeader from "../../components/MusicLandHeader";
|
||||||
@@ -17,7 +17,7 @@ const Compose = () => {
|
|||||||
<MusicLandHeader
|
<MusicLandHeader
|
||||||
onPressBack={goBack}
|
onPressBack={goBack}
|
||||||
progress={9}
|
progress={9}
|
||||||
logo={icons.musicLandStudio}
|
// logo={icons.musicLandStudio}
|
||||||
/>
|
/>
|
||||||
<View
|
<View
|
||||||
style={{ flex: 1, position: "relative", justifyContent: "flex-end" }}
|
style={{ flex: 1, position: "relative", justifyContent: "flex-end" }}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import React, {
|
|||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { Dimensions, FlatList, View } from "react-native";
|
import { Dimensions, FlatList, View } from "react-native";
|
||||||
import { background, icons } from "../../assets";
|
import { background } from "../../assets";
|
||||||
import GradientButton from "../../components/GradientButton";
|
import GradientButton from "../../components/GradientButton";
|
||||||
import MusicLandHeader from "../../components/MusicLandHeader";
|
import MusicLandHeader from "../../components/MusicLandHeader";
|
||||||
import firebase from "../../config/firebase";
|
import firebase from "../../config/firebase";
|
||||||
@@ -176,7 +176,7 @@ const ComposeSong = () => {
|
|||||||
<MusicLandHeader
|
<MusicLandHeader
|
||||||
onPressBack={onPressBack}
|
onPressBack={onPressBack}
|
||||||
progress={progress}
|
progress={progress}
|
||||||
logo={icons.musicLandStudio}
|
// logo={icons.musicLandStudio}
|
||||||
/>
|
/>
|
||||||
<View style={{ flex: 1, paddingBottom: gutters, gap: 48 }}>
|
<View style={{ flex: 1, paddingBottom: gutters, gap: 48 }}>
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react";
|
|||||||
import { Image, Platform, Text, View } from "react-native";
|
import { Image, Platform, Text, View } from "react-native";
|
||||||
import useMinuit from "react-native-minuit/src/hooks/useMinuit.js";
|
import useMinuit from "react-native-minuit/src/hooks/useMinuit.js";
|
||||||
import { responsiveHeight } from "react-native-responsive-dimensions";
|
import { responsiveHeight } from "react-native-responsive-dimensions";
|
||||||
import { ai, background, icons } from "../../assets";
|
import { ai, background } from "../../assets";
|
||||||
import AppAlert from "../../components/Alert";
|
import AppAlert from "../../components/Alert";
|
||||||
import GradientButton from "../../components/GradientButton";
|
import GradientButton from "../../components/GradientButton";
|
||||||
import MusicLandHeader from "../../components/MusicLandHeader";
|
import MusicLandHeader from "../../components/MusicLandHeader";
|
||||||
@@ -263,7 +263,7 @@ const GeneratingSong = () => {
|
|||||||
<MusicLandHeader
|
<MusicLandHeader
|
||||||
onPressBack={() => navigate(Routes.Home)}
|
onPressBack={() => navigate(Routes.Home)}
|
||||||
progress={63}
|
progress={63}
|
||||||
logo={icons.musicLandStudio}
|
// logo={icons.musicLandStudio}
|
||||||
/>
|
/>
|
||||||
<View style={{ flex: 1, marginTop: 16 }}>
|
<View style={{ flex: 1, marginTop: 16 }}>
|
||||||
<CreateLyricsHeader
|
<CreateLyricsHeader
|
||||||
|
|||||||
@@ -159,29 +159,26 @@ const CustomizeSongStructure = ({ baseStructure = [], onChange }) => {
|
|||||||
[extractValues]
|
[extractValues]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleGrant = useCallback(
|
const handleGrant = useCallback((itemId, event) => {
|
||||||
(itemId, event) => {
|
const rect = containerRef.current?.getBoundingClientRect();
|
||||||
const rect = containerRef.current?.getBoundingClientRect();
|
const scrollY = getScrollY();
|
||||||
const scrollY = getScrollY();
|
const nativeEvent = event.nativeEvent || {};
|
||||||
const nativeEvent = event.nativeEvent || {};
|
const fallbackY =
|
||||||
const fallbackY =
|
typeof nativeEvent.pageY === "number"
|
||||||
typeof nativeEvent.pageY === "number"
|
? nativeEvent.pageY
|
||||||
? nativeEvent.pageY
|
: typeof nativeEvent.clientY === "number"
|
||||||
: typeof nativeEvent.clientY === "number"
|
? nativeEvent.clientY + scrollY
|
||||||
? nativeEvent.clientY + scrollY
|
: scrollY;
|
||||||
: scrollY;
|
const containerTop = rect ? rect.top + scrollY : fallbackY;
|
||||||
const containerTop = rect ? rect.top + scrollY : fallbackY;
|
dragStateRef.current = {
|
||||||
dragStateRef.current = {
|
itemId,
|
||||||
itemId,
|
containerTop,
|
||||||
containerTop,
|
};
|
||||||
};
|
setActiveItemId(itemId);
|
||||||
setActiveItemId(itemId);
|
if (typeof document !== "undefined") {
|
||||||
if (typeof document !== "undefined") {
|
document.body.style.userSelect = "none";
|
||||||
document.body.style.userSelect = "none";
|
}
|
||||||
}
|
}, []);
|
||||||
},
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleMove = useCallback((event) => {
|
const handleMove = useCallback((event) => {
|
||||||
const { itemId, containerTop } = dragStateRef.current;
|
const { itemId, containerTop } = dragStateRef.current;
|
||||||
@@ -210,9 +207,7 @@ const CustomizeSongStructure = ({ baseStructure = [], onChange }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleRelease = useCallback(() => {
|
const handleRelease = useCallback(() => {
|
||||||
setSortableItems((prev) =>
|
setSortableItems((prev) => buildSortableItems(extractValues(prev)));
|
||||||
buildSortableItems(extractValues(prev))
|
|
||||||
);
|
|
||||||
dragStateRef.current = {
|
dragStateRef.current = {
|
||||||
itemId: null,
|
itemId: null,
|
||||||
containerTop: 0,
|
containerTop: 0,
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import React, { useCallback, useEffect, useState } from "react";
|
|||||||
import { ActivityIndicator, Text, View } from "react-native";
|
import { ActivityIndicator, Text, View } from "react-native";
|
||||||
import useMinuit from "react-native-minuit/src/hooks/useMinuit.js";
|
import useMinuit from "react-native-minuit/src/hooks/useMinuit.js";
|
||||||
import { background, icons } from "../../assets";
|
import { background, icons } from "../../assets";
|
||||||
|
import alert from "../../components/Alert";
|
||||||
import BorderGradientButton from "../../components/BorderGradientButton";
|
import BorderGradientButton from "../../components/BorderGradientButton";
|
||||||
import GradientButton from "../../components/GradientButton";
|
import GradientButton from "../../components/GradientButton";
|
||||||
import MusicLandHeader from "../../components/MusicLandHeader";
|
import MusicLandHeader from "../../components/MusicLandHeader";
|
||||||
import alert from "../../components/Alert";
|
|
||||||
import firebase, { tasksRef } from "../../config/firebase";
|
import firebase, { tasksRef } from "../../config/firebase";
|
||||||
import loaderMessages from "../../config/loaderMessages";
|
import loaderMessages from "../../config/loaderMessages";
|
||||||
import { isWeb } from "../../hooks/useLayoutType";
|
import { isWeb } from "../../hooks/useLayoutType";
|
||||||
@@ -38,38 +38,41 @@ const PouchReady = () => {
|
|||||||
setCoverStyle(selectedProject?.coverStyle || "");
|
setCoverStyle(selectedProject?.coverStyle || "");
|
||||||
}, [selectedProject?.coverStyle]);
|
}, [selectedProject?.coverStyle]);
|
||||||
|
|
||||||
const generateCover = useCallback(async (styleValue) => {
|
const generateCover = useCallback(
|
||||||
if (!selectedProjectId) return;
|
async (styleValue) => {
|
||||||
if (hasGeneratedOptions) {
|
if (!selectedProjectId) return;
|
||||||
return;
|
if (hasGeneratedOptions) {
|
||||||
}
|
return;
|
||||||
const trimmedStyle = String(styleValue || "").trim();
|
}
|
||||||
if (!trimmedStyle) {
|
const trimmedStyle = String(styleValue || "").trim();
|
||||||
alert("Attention", "Merci de renseigner un style pour la pochette.", [
|
if (!trimmedStyle) {
|
||||||
{ text: "OK" },
|
alert("Attention", "Merci de renseigner un style pour la pochette.", [
|
||||||
]);
|
{ text: "OK" },
|
||||||
return;
|
]);
|
||||||
}
|
return;
|
||||||
try {
|
}
|
||||||
await setIsLoading(true);
|
try {
|
||||||
await updateProjectData(
|
await setIsLoading(true);
|
||||||
{
|
await updateProjectData(
|
||||||
coverStyle: trimmedStyle,
|
{
|
||||||
},
|
coverStyle: trimmedStyle,
|
||||||
{ merge: true }
|
},
|
||||||
);
|
{ merge: true }
|
||||||
await tasksRef.add({
|
);
|
||||||
type: "cover",
|
await tasksRef.add({
|
||||||
projectId: selectedProjectId,
|
type: "cover",
|
||||||
status: "PENDING",
|
projectId: selectedProjectId,
|
||||||
createdAt: firebase.firestore.FieldValue.serverTimestamp(),
|
status: "PENDING",
|
||||||
});
|
createdAt: firebase.firestore.FieldValue.serverTimestamp(),
|
||||||
} catch (e) {
|
});
|
||||||
console.log("Cover task error", e?.message);
|
} catch (e) {
|
||||||
} finally {
|
console.log("Cover task error", e?.message);
|
||||||
setIsLoading(false);
|
} finally {
|
||||||
}
|
setIsLoading(false);
|
||||||
}, [hasGeneratedOptions, selectedProjectId, setIsLoading, updateProjectData]);
|
}
|
||||||
|
},
|
||||||
|
[hasGeneratedOptions, selectedProjectId, setIsLoading, updateProjectData]
|
||||||
|
);
|
||||||
|
|
||||||
const requestCoverGeneration = useCallback(() => {
|
const requestCoverGeneration = useCallback(() => {
|
||||||
const trimmedStyle = (coverStyle || "").trim();
|
const trimmedStyle = (coverStyle || "").trim();
|
||||||
@@ -137,7 +140,8 @@ const PouchReady = () => {
|
|||||||
>
|
>
|
||||||
{displayOptions.length > 0 ? (
|
{displayOptions.length > 0 ? (
|
||||||
displayOptions.map((option, index) => {
|
displayOptions.map((option, index) => {
|
||||||
const optionUri = option?.finalUrl || option?.generatedUrl || "";
|
const optionUri =
|
||||||
|
option?.finalUrl || option?.generatedUrl || "";
|
||||||
if (!optionUri) return null;
|
if (!optionUri) return null;
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
@@ -239,7 +243,9 @@ const PouchReady = () => {
|
|||||||
>
|
>
|
||||||
{!hasGeneratedOptions && (
|
{!hasGeneratedOptions && (
|
||||||
<BorderGradientButton
|
<BorderGradientButton
|
||||||
title={isGenerating ? "Génération en cours..." : "Générer la pochette"}
|
title={
|
||||||
|
isGenerating ? "Génération en cours..." : "Générer la pochette"
|
||||||
|
}
|
||||||
icon={icons.stars}
|
icon={icons.stars}
|
||||||
onPress={requestCoverGeneration}
|
onPress={requestCoverGeneration}
|
||||||
disabled={isGenerating}
|
disabled={isGenerating}
|
||||||
|
|||||||
Reference in New Issue
Block a user