From 2ed7394adc75ab0d9ab3af2f2dd1cd9dd6de60ce Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 19 May 2026 11:52:51 -0700 Subject: [PATCH] Update header, add a sidebar to the design --- .../HelpCenter/HelpCenterLayout.vue | 79 +++++---- .../Pages/ArticlePage/ArticlesPage.vue | 1 + .../Pages/CategoryPage/CategoriesPage.vue | 5 +- .../Pages/LocalePage/LocalesPage.vue | 5 +- .../PortalSettingsPage/PortalBaseSettings.vue | 47 +----- .../PortalConfigurationSettings.vue | 20 ++- .../PortalSettingsPage/PortalSettings.vue | 155 ++++++++++-------- .../HelpCenter/PortalAvatar.vue | 27 +++ .../PortalSwitcher/PortalSwitcher.vue | 6 +- .../dashboard/i18n/locale/en/helpCenter.json | 36 +++- 10 files changed, 219 insertions(+), 162 deletions(-) create mode 100644 app/javascript/dashboard/components-next/HelpCenter/PortalAvatar.vue diff --git a/app/javascript/dashboard/components-next/HelpCenter/HelpCenterLayout.vue b/app/javascript/dashboard/components-next/HelpCenter/HelpCenterLayout.vue index 5b6399da7..3fc1932af 100644 --- a/app/javascript/dashboard/components-next/HelpCenter/HelpCenterLayout.vue +++ b/app/javascript/dashboard/components-next/HelpCenter/HelpCenterLayout.vue @@ -5,6 +5,7 @@ import { useRoute } from 'vue-router'; import { useMapGetter } from 'dashboard/composables/store.js'; import PaginationFooter from 'dashboard/components-next/pagination/PaginationFooter.vue'; +import PortalAvatar from 'dashboard/components-next/HelpCenter/PortalAvatar.vue'; import Button from 'dashboard/components-next/button/Button.vue'; import PortalSwitcher from 'dashboard/components-next/HelpCenter/PortalSwitcher/PortalSwitcher.vue'; import CreatePortalDialog from 'dashboard/components-next/HelpCenter/PortalSwitcher/CreatePortalDialog.vue'; @@ -30,6 +31,10 @@ defineProps({ type: Boolean, default: true, }, + breadcrumbLabel: { + type: String, + default: '', + }, }); const emit = defineEmits(['update:currentPage']); @@ -44,10 +49,15 @@ const portals = useMapGetter('portals/allPortals'); const currentPortalSlug = computed(() => route.params.portalSlug); -const activePortalName = computed(() => { - return portals.value?.find(portal => portal.slug === currentPortalSlug.value) - ?.name; -}); +const activePortal = computed(() => + portals.value?.find(portal => portal.slug === currentPortalSlug.value) +); + +const activePortalName = computed(() => activePortal.value?.name); + +const activePortalLogo = computed( + () => activePortal.value?.logo?.file_url || '' +); const updateCurrentPage = page => { emit('update:currentPage', page); @@ -65,32 +75,45 @@ const togglePortalSwitcher = () => { v-if="showHeaderTitle" class="flex items-center justify-start h-20 gap-2" > - - {{ activePortalName }} - -
- -
+ + + + + + + + diff --git a/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.vue b/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.vue index fde215824..8d45bce0d 100644 --- a/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.vue +++ b/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.vue @@ -256,6 +256,7 @@ watch( :total-items="articlesCount" :items-per-page="25" :header="portalName" + :breadcrumb-label="$t('HELP_CENTER.BREADCRUMB.ARTICLES')" :show-pagination-footer="shouldShowPaginationFooter" @update:current-page="handlePageChange" > diff --git a/app/javascript/dashboard/components-next/HelpCenter/Pages/CategoryPage/CategoriesPage.vue b/app/javascript/dashboard/components-next/HelpCenter/Pages/CategoryPage/CategoriesPage.vue index 1f4e4b347..75a613bf6 100644 --- a/app/javascript/dashboard/components-next/HelpCenter/Pages/CategoryPage/CategoriesPage.vue +++ b/app/javascript/dashboard/components-next/HelpCenter/Pages/CategoryPage/CategoriesPage.vue @@ -112,7 +112,10 @@ const reorderCategories = async reorderedGroup => {