mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
2 files changed
+16
-3
No files matched your search
@@ -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>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user