Merge pull request #68 from R0m1k3/dev

Dev
This commit is contained in:
LogiFlow authored and GitHub committed 2025-10-13 08:10:56 +02:00
commit 24c8a70800
2 files changed
+16 -3

No files matched your search

+5 -1
View File
@@ -18,7 +18,7 @@ import { useToast } from "@/hooks/use-toast";
interface Ribbon {
enabled: boolean;
text: "Promo" | "Nouveauté" | "Arrivage";
text: "Promo" | "Nouveauté" | "Arrivage" | "Stock limité";
color: "red" | "yellow";
position: "north_west" | "north_east";
}
@@ -468,6 +468,10 @@ export default function ImageEditor() {
<RadioGroupItem value="Arrivage" id="ribbon-arrivage" data-testid="radio-ribbon-arrivage" />
<Label htmlFor="ribbon-arrivage">Arrivage</Label>
</div>
<div className="flex items-center space-x-2">
<RadioGroupItem value="Stock limité" id="ribbon-stock" data-testid="radio-ribbon-stock" />
<Label htmlFor="ribbon-stock">Stock limité</Label>
</div>
</RadioGroup>
</div>
+11 -2
View File
@@ -38,11 +38,20 @@ export class FacebookService {
}
if (postType === 'story') {
// Publish as story only
// Publish as story - one story per media
if (mediaList.length === 0) {
throw new Error('Stories require media (photo or video)');
}
return await this.publishStory(post, page, mediaList[0]);
// Publish each media as a separate story
const storyIds: string[] = [];
for (const media of mediaList) {
const storyId = await this.publishStory(post, page, media);
storyIds.push(storyId);
}
// Return all story IDs joined together
return storyIds.join(',');
} else {
// Default to feed
// Count images only (videos not supported in multi-photo carousel)