From d97304fb743c069e393d91e3ebe9f6c73b951573 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Mon, 22 Jun 2026 17:20:48 -0300 Subject: [PATCH] feat(sidebar): add Support section with external links Add a Support group at the bottom of the sidebar with Share feedback, Earn 30% referral (affiliates), Stay updated (X) and Documentation. Share feedback and Documentation move out of the user menu into this section. Adds the referral/stay_updated labels in all three locales. --- lang/en/sidebar.php | 2 ++ lang/es/sidebar.php | 2 ++ lang/pt-BR/sidebar.php | 2 ++ resources/js/components/AppSidebar.vue | 29 ++++++++++++++++++ resources/js/components/NavSupport.vue | 34 +++++++++++++++++++++ resources/js/components/UserMenuContent.vue | 27 ---------------- 6 files changed, 69 insertions(+), 27 deletions(-) create mode 100644 resources/js/components/NavSupport.vue diff --git a/lang/en/sidebar.php b/lang/en/sidebar.php index 2892a5f6..e813b6f8 100644 --- a/lang/en/sidebar.php +++ b/lang/en/sidebar.php @@ -58,5 +58,7 @@ 'share_feedback' => 'Share feedback', 'last_updates' => 'Last Updates', 'docs' => 'Documentation', + 'referral' => 'Earn 30% referral', + 'stay_updated' => 'Stay updated', ], ]; diff --git a/lang/es/sidebar.php b/lang/es/sidebar.php index 291ec360..b619e075 100644 --- a/lang/es/sidebar.php +++ b/lang/es/sidebar.php @@ -58,5 +58,7 @@ 'share_feedback' => 'Dar feedback', 'last_updates' => 'Últimas actualizaciones', 'docs' => 'Documentación', + 'referral' => 'Gana 30% de comisión', + 'stay_updated' => 'Mantente al día', ], ]; diff --git a/lang/pt-BR/sidebar.php b/lang/pt-BR/sidebar.php index e4178c6e..e2dba7a9 100644 --- a/lang/pt-BR/sidebar.php +++ b/lang/pt-BR/sidebar.php @@ -58,5 +58,7 @@ 'share_feedback' => 'Enviar feedback', 'last_updates' => 'Últimas Atualizações', 'docs' => 'Documentação', + 'referral' => 'Ganhe 30% de indicação', + 'stay_updated' => 'Fique por dentro', ], ]; diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue index 5146f42c..07093ee3 100644 --- a/resources/js/components/AppSidebar.vue +++ b/resources/js/components/AppSidebar.vue @@ -4,13 +4,17 @@ import { IconAffiliate, IconAlertTriangle, IconBolt, + IconBook, + IconBrandX, IconCalendar, IconChartBar, IconChevronRight, IconClock, IconFileCheck, IconFileText, + IconGift, IconHash, + IconMessageCircle, IconPhoto, IconPencil, IconPlus, @@ -22,6 +26,7 @@ import { computed } from 'vue'; import { create as createPost, index as postsIndex } from '@/actions/App/Http/Controllers/App/PostController'; import NavMain from '@/components/NavMain.vue'; +import NavSupport from '@/components/NavSupport.vue'; import NavUser from '@/components/NavUser.vue'; import { Avatar } from '@/components/ui/avatar'; import { Button } from '@/components/ui/button'; @@ -144,6 +149,29 @@ const workspaceNavItems = computed(() => [ : []), ]); +const supportNavItems = computed(() => [ + { + title: trans('sidebar.support.share_feedback'), + href: 'https://github.com/trypost-it/trypost/discussions', + icon: IconMessageCircle, + }, + { + title: trans('sidebar.support.referral'), + href: 'https://affiliates.trypost.it/', + icon: IconGift, + }, + { + title: trans('sidebar.support.stay_updated'), + href: 'https://x.com/trypostit', + icon: IconBrandX, + }, + { + title: trans('sidebar.support.docs'), + href: 'https://trypost.it/docs', + icon: IconBook, + }, +]); + const switchWorkspace = (workspaceId: string) => { router.post(switchMethod.url(workspaceId), {}, { preserveScroll: true, @@ -217,6 +245,7 @@ const handleCreateWorkspace = () => { + diff --git a/resources/js/components/NavSupport.vue b/resources/js/components/NavSupport.vue new file mode 100644 index 00000000..bf301ad0 --- /dev/null +++ b/resources/js/components/NavSupport.vue @@ -0,0 +1,34 @@ + + + diff --git a/resources/js/components/UserMenuContent.vue b/resources/js/components/UserMenuContent.vue index 008964a4..c9e1a989 100644 --- a/resources/js/components/UserMenuContent.vue +++ b/resources/js/components/UserMenuContent.vue @@ -2,9 +2,7 @@ import { Link, router, usePage } from '@inertiajs/vue3'; import { IconLanguage, - IconLifebuoy, IconLogout, - IconMessageCircle, IconUser, } from '@tabler/icons-vue'; import { loadLanguageAsync } from 'laravel-vue-i18n'; @@ -106,31 +104,6 @@ const handleLogout = () => { - - - - - {{ $t('sidebar.support.share_feedback') }} - - - - - - {{ $t('sidebar.support.docs') }} - - - -