mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-23 23:18:12 +02:00
2 files changed
+16
-3
No files matched your search
@@ -18,7 +18,7 @@ import { useToast } from "@/hooks/use-toast";
|
|||||||
|
|
||||||
interface Ribbon {
|
interface Ribbon {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
text: "Promo" | "Nouveauté" | "Arrivage";
|
text: "Promo" | "Nouveauté" | "Arrivage" | "Stock limité";
|
||||||
color: "red" | "yellow";
|
color: "red" | "yellow";
|
||||||
position: "north_west" | "north_east";
|
position: "north_west" | "north_east";
|
||||||
}
|
}
|
||||||
@@ -468,6 +468,10 @@ export default function ImageEditor() {
|
|||||||
<RadioGroupItem value="Arrivage" id="ribbon-arrivage" data-testid="radio-ribbon-arrivage" />
|
<RadioGroupItem value="Arrivage" id="ribbon-arrivage" data-testid="radio-ribbon-arrivage" />
|
||||||
<Label htmlFor="ribbon-arrivage">Arrivage</Label>
|
<Label htmlFor="ribbon-arrivage">Arrivage</Label>
|
||||||
</div>
|
</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>
|
</RadioGroup>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -38,11 +38,20 @@ export class FacebookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (postType === 'story') {
|
if (postType === 'story') {
|
||||||
// Publish as story only
|
// Publish as story - one story per media
|
||||||
if (mediaList.length === 0) {
|
if (mediaList.length === 0) {
|
||||||
throw new Error('Stories require media (photo or video)');
|
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 {
|
} else {
|
||||||
// Default to feed
|
// Default to feed
|
||||||
// Count images only (videos not supported in multi-photo carousel)
|
// Count images only (videos not supported in multi-photo carousel)
|
||||||
|
|||||||
Reference in new issue
Block a user