diff --git a/lang/en/posts.php b/lang/en/posts.php index d2cd6f8f..6d6987f8 100644 --- a/lang/en/posts.php +++ b/lang/en/posts.php @@ -187,7 +187,7 @@ 'no_image_allowed' => 'This post type accepts only videos.', 'no_document_allowed' => 'This post type does not accept PDF documents.', 'no_mixed_media' => "Images and a video can't be combined in the same post.", - 'document_not_alone' => 'A PDF must be the only attachment.', + 'document_not_alone' => 'A PDF must be posted on its own, without other images or videos.', 'gif_not_allowed' => 'This platform does not accept GIF. Remove the GIF or choose a different network.', 'image_too_large' => 'Image exceeds the :max limit for this post type (yours is :current).', 'video_too_large' => 'Video exceeds the :max limit for this post type (yours is :current).', @@ -346,7 +346,7 @@ 'no_mixed_media' => "Images and videos can't be combined in the same post.", 'no_gifs' => 'GIFs are not supported here.', 'no_documents' => 'PDF documents are not supported by this format.', - 'document_not_alone' => 'A PDF must be the only attachment.', + 'document_not_alone' => 'A PDF must be posted on its own, without other images or videos.', 'video_too_large' => 'Video exceeds the size limit for this platform.', 'video_too_long' => 'Video must be under :seconds seconds for this format.', 'image_too_large' => 'Image exceeds the size limit for this platform.', diff --git a/lang/es/posts.php b/lang/es/posts.php index 67774af0..c4c3af01 100644 --- a/lang/es/posts.php +++ b/lang/es/posts.php @@ -187,7 +187,7 @@ 'no_image_allowed' => 'Este tipo acepta solo videos.', 'no_document_allowed' => 'Este tipo no acepta documentos PDF.', 'no_mixed_media' => 'No se pueden combinar imágenes y un video en la misma publicación.', - 'document_not_alone' => 'Un PDF debe ser el único archivo adjunto.', + 'document_not_alone' => 'Un PDF debe publicarse solo, sin otras imágenes ni videos.', 'gif_not_allowed' => 'Esta red no acepta GIF. Elimínalo o selecciona otra red.', 'image_too_large' => 'La imagen supera el límite de :max (la tuya es :current).', 'video_too_large' => 'El video supera el límite de :max (el tuyo es :current).', @@ -346,7 +346,7 @@ 'no_mixed_media' => 'No se pueden combinar imágenes y videos en la misma publicación.', 'no_gifs' => 'Los GIFs no son compatibles aquí.', 'no_documents' => 'Los documentos PDF no son compatibles con este formato.', - 'document_not_alone' => 'Un PDF debe ser el único archivo adjunto.', + 'document_not_alone' => 'Un PDF debe publicarse solo, sin otras imágenes ni videos.', 'video_too_large' => 'El video supera el límite de tamaño de esta plataforma.', 'video_too_long' => 'El video debe durar menos de :seconds segundos en este formato.', 'image_too_large' => 'La imagen supera el límite de tamaño de esta plataforma.', diff --git a/lang/pt-BR/posts.php b/lang/pt-BR/posts.php index 515c8d31..1f0b03c5 100644 --- a/lang/pt-BR/posts.php +++ b/lang/pt-BR/posts.php @@ -187,7 +187,7 @@ 'no_image_allowed' => 'Este tipo aceita apenas vídeos.', 'no_document_allowed' => 'Este tipo não aceita documentos PDF.', 'no_mixed_media' => 'Não dá pra combinar imagens e um vídeo no mesmo post.', - 'document_not_alone' => 'Um PDF deve ser o único anexo.', + 'document_not_alone' => 'Um PDF precisa ser publicado sozinho, sem outras imagens ou vídeos.', 'gif_not_allowed' => 'Esta rede não aceita GIF. Remova o GIF ou escolha outra rede.', 'image_too_large' => 'A imagem passa do limite de :max (a sua tem :current).', 'video_too_large' => 'O vídeo passa do limite de :max (o seu tem :current).', @@ -346,7 +346,7 @@ 'no_mixed_media' => 'Não é possível combinar imagem e vídeo na mesma publicação.', 'no_gifs' => 'GIFs não são suportados aqui.', 'no_documents' => 'Documentos PDF não são suportados por este formato.', - 'document_not_alone' => 'Um PDF deve ser o único anexo.', + 'document_not_alone' => 'Um PDF precisa ser publicado sozinho, sem outras imagens ou vídeos.', 'video_too_large' => 'Vídeo excede o limite de tamanho desta plataforma.', 'video_too_long' => 'Vídeo deve ter menos de :seconds segundos neste formato.', 'image_too_large' => 'Imagem excede o limite de tamanho desta plataforma.', diff --git a/resources/js/components/ChannelConfigurator.vue b/resources/js/components/ChannelConfigurator.vue index 32f5f711..1feb31e2 100644 --- a/resources/js/components/ChannelConfigurator.vue +++ b/resources/js/components/ChannelConfigurator.vue @@ -163,7 +163,6 @@ const selectedChannels = computed(() => props.channels.filter((channel) => isSel v-else-if="channel.platform === Platform.LinkedIn || channel.platform === Platform.LinkedInPage" :social-account="channel.socialAccount" :platform="channel.platform" - :content-type="channel.contentType" :media="media" :meta="channel.meta" :disabled="disabled" diff --git a/resources/js/components/assets/GalleryBrowser.vue b/resources/js/components/assets/GalleryBrowser.vue index 3ef9f68e..882a87d8 100644 --- a/resources/js/components/assets/GalleryBrowser.vue +++ b/resources/js/components/assets/GalleryBrowser.vue @@ -140,6 +140,9 @@ const toggleSelect = (asset: AssetMedia | SavedMedia, extra?: Partial -import { IconAlertTriangle, IconChevronDown, IconChevronUp } from '@tabler/icons-vue'; +import { IconChevronDown, IconChevronUp } from '@tabler/icons-vue'; import { computed, ref } from 'vue'; import { Avatar } from '@/components/ui/avatar'; import { Input } from '@/components/ui/input'; -import { getMediaValidationWarning, isDocumentMedia } from '@/composables/useMedia'; +import { isDocumentMedia } from '@/composables/useMedia'; import { getPlatformLogo } from '@/composables/usePlatformLogo'; import type { MediaItem } from '@/types/media'; import { Platform } from '@/types/platform'; @@ -20,7 +20,6 @@ interface SocialAccount { interface Props { socialAccount: SocialAccount | null; platform: string; - contentType: string; media: MediaItem[]; meta?: Record; disabled?: boolean; @@ -41,20 +40,23 @@ const open = ref(false); const isPage = computed(() => props.platform === Platform.LinkedInPage); -// The publish format follows the media; the only thing to configure is the -// title shown on a document (PDF) post, so we only expose it when a PDF is set. -const hasPdf = computed(() => props.media.some((item) => isDocumentMedia(item))); +const pdfDocument = computed( + () => props.media.find((item) => isDocumentMedia(item)) ?? null, +); + +const hasPdf = computed(() => pdfDocument.value !== null); const documentTitle = computed({ - get: () => (props.meta?.document_title as string | undefined) ?? '', + get: () => + (props.meta?.document_title as string | undefined) || + pdfDocument.value?.original_filename || + '', set: (value: string) => emit('update:meta', { ...props.meta, document_title: value || null }), }); - -const warning = computed(() => getMediaValidationWarning(props.contentType, props.media)); diff --git a/resources/js/pages/accounts/LinkedInSelect.vue b/resources/js/pages/accounts/LinkedInSelect.vue index c728986e..b4b9b9ac 100644 --- a/resources/js/pages/accounts/LinkedInSelect.vue +++ b/resources/js/pages/accounts/LinkedInSelect.vue @@ -1,5 +1,10 @@