From 3fe70b1402435bb50ae0bfa20a96d09c40f8c190 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Wed, 10 Jun 2026 13:58:45 -0300 Subject: [PATCH] refactor(PostEditor): update PostEditorTabs integration and enhance schedule tab visibility logic --- package-lock.json | 1 - .../js/components/posts/editor/PostEditorTabs.vue | 2 +- resources/js/components/posts/editor/PreviewTab.vue | 2 +- resources/js/pages/posts/Edit.vue | 12 ++++++------ 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96a8f02c..bbf85de6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "trypost", "dependencies": { "@inertiajs/vue3": "^3.0.0", "@tabler/icons-vue": "^3.36.1", diff --git a/resources/js/components/posts/editor/PostEditorTabs.vue b/resources/js/components/posts/editor/PostEditorTabs.vue index 6938ecb2..e175112c 100644 --- a/resources/js/components/posts/editor/PostEditorTabs.vue +++ b/resources/js/components/posts/editor/PostEditorTabs.vue @@ -107,7 +107,7 @@ defineExpose({ /> - + { -
+
{ const initialHighlightCommentId = queryParams?.get('comment') ?? null; const activeTab = ref(initialTabFromQuery); const deleteModal = ref | null>(null); -const editorSidebarRef = ref | null>(null); +const editorTabsRef = ref | null>(null); const snapToCompatibleVariant = (platformId: string) => { const pp = post.value.post_platforms.find((p) => p.id === platformId); @@ -339,9 +339,9 @@ usePostEcho(post.value.id, '.post.platform.status.updated', () => { // Echo: listen for real-time comments usePostEcho(post.value.id, '.post.comment.created', (e: any) => { if (e.mentioned_users) { - editorSidebarRef.value?.registerMentionedUsers(e.mentioned_users); + editorTabsRef.value?.registerMentionedUsers(e.mentioned_users); } - editorSidebarRef.value?.addCommentFromBroadcast(e.comment); + editorTabsRef.value?.addCommentFromBroadcast(e.comment); }); @@ -402,8 +402,8 @@ usePostEcho(post.value.id, '.post.comment.created', (e: any) => {