fix: cover image logo

This commit is contained in:
2025-11-04 16:28:02 +01:00
parent 7d93be845b
commit c1848f0ced
4 changed files with 7162 additions and 20 deletions
-1
View File
@@ -74,7 +74,6 @@ exports.generatePicturePrompt = (project = {}) => {
<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 "MusicLand Production".</INTERDIT>
<INTERDIT>Texte illisible ou trop petit.</INTERDIT> <INTERDIT>Texte illisible ou trop petit.</INTERDIT>
</CONTRAINTES> </CONTRAINTES>
`.trim(); `.trim();
+7143
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -11,7 +11,7 @@ const { ALERT_TYPE, refList } = require("../index");
const { sendNotification } = require("./notifications"); const { sendNotification } = require("./notifications");
const bucket = admin.storage().bucket(); const bucket = admin.storage().bucket();
const LOGO_PATH = path.resolve(__dirname, "../assets/musicLandProduction.png"); const LOGO_PATH = path.resolve(__dirname, "../assets/musicLandLogo.png");
async function buildCoverWithLogo(backgroundUrl, targetPath) { async function buildCoverWithLogo(backgroundUrl, targetPath) {
logger.info("🖼️ [Cover] Adding logo to generated background"); logger.info("🖼️ [Cover] Adding logo to generated background");
+18 -18
View File
@@ -11,7 +11,7 @@ import {
View, View,
} from "react-native"; } 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 { icons } from "../../assets";
import alert from "../../components/Alert"; import alert from "../../components/Alert";
import AppCheckbox from "../../components/AppCheckbox"; import AppCheckbox from "../../components/AppCheckbox";
import BorderGradientButton from "../../components/BorderGradientButton"; import BorderGradientButton from "../../components/BorderGradientButton";
@@ -52,7 +52,9 @@ const PouchReady = () => {
if (!coverOptions.length) { if (!coverOptions.length) {
return null; return null;
} }
const found = coverOptions.find((option) => option?.id === selectedOptionId); const found = coverOptions.find(
(option) => option?.id === selectedOptionId
);
return found || coverOptions[0] || null; return found || coverOptions[0] || null;
}, [coverOptions, selectedOptionId]); }, [coverOptions, selectedOptionId]);
const coverBackgroundMessage = isWeb const coverBackgroundMessage = isWeb
@@ -136,16 +138,7 @@ const PouchReady = () => {
]); ]);
return; return;
} }
alert("Attention", "Générer une pochette ?", [ generateCover(trimmedStyle);
{
text: "Annuler",
style: "cancel",
},
{
text: "Oui",
onPress: () => generateCover(trimmedStyle),
},
]);
}, [customStyle, generateCover, selectedPresetStyle, styleMode]); }, [customStyle, generateCover, selectedPresetStyle, styleMode]);
const coverPreviewUrl = const coverPreviewUrl =
@@ -247,8 +240,9 @@ const PouchReady = () => {
text: "Continuer avec John", text: "Continuer avec John",
onPress: () => { onPress: () => {
const targetRoute = playbackStage?.route || Routes.Playback; const targetRoute = playbackStage?.route || Routes.Playback;
const params = const params = playbackStage?.params || {
playbackStage?.params || { project: projectForStage }; project: projectForStage,
};
navigate(targetRoute, params); navigate(targetRoute, params);
}, },
}, },
@@ -279,7 +273,7 @@ const PouchReady = () => {
(hasGeneratedOptions ? !selectedOption || isSelecting : true); (hasGeneratedOptions ? !selectedOption || isSelecting : true);
return ( return (
<Page backgroundImg={background.studioBG2} headerType="NONE"> <Page backgroundColor={"#2A2E33"} headerType="NONE">
<MusicLandHeader onPressBack={goBack} progress={72} /> <MusicLandHeader onPressBack={goBack} progress={72} />
<View style={{ flex: 1, marginTop: 0 }}> <View style={{ flex: 1, marginTop: 0 }}>
<CreateLyricsHeader <CreateLyricsHeader
@@ -461,21 +455,27 @@ const PouchReady = () => {
style={styles.dropdownTrigger} style={styles.dropdownTrigger}
onPress={() => setIsPresetDropdownOpen((prev) => !prev)} onPress={() => setIsPresetDropdownOpen((prev) => !prev)}
> >
<Text style={styles.dropdownTriggerLabel} numberOfLines={2}> <Text
style={styles.dropdownTriggerLabel}
numberOfLines={2}
>
{selectedPresetStyle} {selectedPresetStyle}
</Text> </Text>
<Image <Image
source={icons.chevronDown} source={icons.chevronDown}
style={[ style={[
styles.dropdownArrow, styles.dropdownArrow,
isPresetDropdownOpen ? styles.dropdownArrowOpen : null, isPresetDropdownOpen
? styles.dropdownArrowOpen
: null,
]} ]}
/> />
</Pressable> </Pressable>
{isPresetDropdownOpen && ( {isPresetDropdownOpen && (
<View style={styles.dropdownList}> <View style={styles.dropdownList}>
{COVER_STYLE_PRESETS.map((styleOption, index) => { {COVER_STYLE_PRESETS.map((styleOption, index) => {
const isActive = selectedPresetStyle === styleOption; const isActive =
selectedPresetStyle === styleOption;
const isLast = const isLast =
index === COVER_STYLE_PRESETS.length - 1; index === COVER_STYLE_PRESETS.length - 1;
return ( return (