From 61f8804a92afeeb8fda9cdd4a64434a45c2dd6a5 Mon Sep 17 00:00:00 2001 From: Bernardo Simonassi Date: Wed, 24 Jan 2024 23:23:39 -0300 Subject: [PATCH 1/6] feat: update left menu after route changes --- .../app/components/organisms/DefaultAside.vue | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/app/components/organisms/DefaultAside.vue b/apps/app/components/organisms/DefaultAside.vue index b14f7db..d8752a6 100644 --- a/apps/app/components/organisms/DefaultAside.vue +++ b/apps/app/components/organisms/DefaultAside.vue @@ -3,6 +3,8 @@ const searchModalStore = useSearchModalStore(); const route = useRoute(); const defaultAsideStore = useDefaultAsideStore(); +const fullPath = computed(() => route.fullPath); + const queryBuilder = computed(() => { return queryContent(`/${route.params?.slug ? route.params.slug[0] : ""}`); }); @@ -10,11 +12,15 @@ const queryBuilder = computed(() => { const { data: navigation, refresh } = await useAsyncData( route.params?.slug ? route.params.slug[0] : "navigation", () => fetchContentNavigation(queryBuilder.value), - { - watch: [route], - } + { watch: [fullPath] } ); +const navigationItem = computed(() => { + if (!navigation.value || navigation.value.length <= 0) return; + + return navigation.value[0]; +}); + const isLesson = computed(() => { return !!route.meta?.lesson; }); @@ -61,9 +67,13 @@ watch(isLesson, async () => {
-
+
From b9f560521a29ee51a06b6f076f0baced4a832293 Mon Sep 17 00:00:00 2001 From: Bernardo Simonassi Date: Sat, 27 Jan 2024 09:49:09 -0300 Subject: [PATCH 2/6] feat: update page title --- apps/app/pages/[...slug].vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/app/pages/[...slug].vue b/apps/app/pages/[...slug].vue index e61ac0b..eee8c65 100644 --- a/apps/app/pages/[...slug].vue +++ b/apps/app/pages/[...slug].vue @@ -1,4 +1,5 @@ diff --git a/apps/app/components/atoms/CreatorsImageCard.vue b/apps/app/components/atoms/CreatorsImageCard.vue index f70bfef..b1bf9a5 100644 --- a/apps/app/components/atoms/CreatorsImageCard.vue +++ b/apps/app/components/atoms/CreatorsImageCard.vue @@ -6,6 +6,8 @@ const { fileUrl = "" } = defineProps<{ const source = ref(fileUrl); const { copy, copied } = useClipboard({ source }); + +defineEmits(["remove"]);