Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
<script setup lang="ts">
import { IconPhoto } from '@tabler/icons-vue';
import { computed } from 'vue';
import VideoPreview from '@/components/posts/previews/VideoPreview.vue';
import { isVideoMedia } from '@/composables/useMedia';
import type { MediaItem } from '@/types/media';
const props = withDefaults(
defineProps<{
media: MediaItem[];
/** What fills the space around a photo that is not 9:16: a blurred copy of it, or black. */
backdrop?: 'blur' | 'black';
}>(),
{ backdrop: 'blur' },
);
const item = computed<MediaItem | null>(() => props.media[0] ?? null);
</script>
<template>
<div class="absolute inset-0 overflow-hidden bg-black">
<template v-if="item">
<VideoPreview v-if="isVideoMedia(item)" :media="item" video-class="h-full w-full object-cover" />
<template v-else>
<template v-if="backdrop === 'blur'">
<div class="absolute inset-x-0 top-0 h-1/2 overflow-hidden">
<img :src="item.url" alt="" aria-hidden="true" class="h-full w-full blur-3xl brightness-110" />
</div>
<div class="absolute inset-x-0 bottom-0 h-1/2 -scale-y-100 overflow-hidden">
<img :src="item.url" alt="" aria-hidden="true" class="h-full w-full blur-3xl brightness-110" />
</div>
</template>
<img :src="item.url" :alt="item.original_filename"
class="absolute inset-0 h-full w-full object-contain" />
</template>
</template>
<template v-else>
<slot name="placeholder">
<div class="flex h-full w-full items-center justify-center">
<IconPhoto class="h-12 w-12 text-muted-foreground/40" />
</div>
</slot>
</template>
</div>
</template>