Refactor VkPostPublisher to simplify message formatting and enhance PostListItem layout for better author display
This commit is contained in:
@@ -88,7 +88,7 @@ class VkPostPublisher
|
||||
private function generateContentForVk($post): string
|
||||
{
|
||||
$message = '';
|
||||
$message .= "Название: $post->title\n\n";
|
||||
$message .= "$post->title\n\n";
|
||||
|
||||
if (is_array($post->content)) {
|
||||
$message .= $this->parseContentBlocks($post->content);
|
||||
|
||||
@@ -58,18 +58,20 @@
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 text-gray-500">
|
||||
|
||||
<span v-if="post?.authors?.length" class="truncate text-sm">
|
||||
{{ textLimit(post.authors[0], 40) }}
|
||||
<div
|
||||
class="mt-3 flex items-center space-x-3 text-gray-500 dark:text-gray-400"
|
||||
>
|
||||
<span>
|
||||
<div class="flex items-center gap-3">
|
||||
<span v-if="post && post.authors && post.authors.length > 0" class="truncate text-sm">
|
||||
{{ textLimit(post.authors[0], 20) }}
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<span v-if="post?.authors?.length" class="text-xs text-gray-300 dark:text-gray-600">•</span>
|
||||
|
||||
<span class="truncate text-sm">
|
||||
{{ post.created_post }}
|
||||
</span>
|
||||
|
||||
<span class="text-xs text-gray-300 dark:text-gray-600"
|
||||
>•</span
|
||||
>
|
||||
<span class="truncate text-sm">{{ post.created_post }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,6 +80,7 @@
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user