diff --git a/src/components/sections/navbar/MainNavigation.vue b/src/components/sections/navbar/MainNavigation.vue index dc485a8..a2f39a9 100644 --- a/src/components/sections/navbar/MainNavigation.vue +++ b/src/components/sections/navbar/MainNavigation.vue @@ -3,7 +3,7 @@ import { useRouter, useRoute } from 'vue-router' import { Navbar, NavbarBrand, NavbarLayer } from '@/components/sections/navbar' import { DarkMode } from '@/components/darkMode' import { ThemingSettings } from '@/components/theming' -import { Home, ChevronsRight, PackageCheck, AlignRight } from 'lucide-vue-next' +import { Home, ChevronsRight, PackageCheck, AlignRight, Combine } from 'lucide-vue-next' import { NavigationMenu, NavigationMenuList, @@ -29,11 +29,20 @@ import { } from '@/components/ui/accordion' import { ScrollArea } from '@/components/ui/scroll-area' import { Separator } from '@/components/ui/separator' -import { defineAsyncComponent } from 'vue' +import { defineAsyncComponent, ref, watch, onMounted } from 'vue' +import { useCollecty } from '@/composables/useCollecty' const router = useRouter() // const route = useRoute() +const { collection } = useCollecty() +const isButtonVisible = ref(false) + +// Следим за изменениями в коллекции +watch(() => collection.value, (newCollection) => { + isButtonVisible.value = newCollection.length > 0 +}, { immediate: true, deep: true }) + interface RouteChild { name: string path: string @@ -132,6 +141,18 @@ const menuDescription = 'Main navigation menu with all available sections and pa
+ + diff --git a/src/components/theming/ThemingSettings.vue b/src/components/theming/ThemingSettings.vue index 587bd1e..2873e8e 100644 --- a/src/components/theming/ThemingSettings.vue +++ b/src/components/theming/ThemingSettings.vue @@ -31,7 +31,7 @@ const sheetContent = { icon: Puzzle, label: 'Go to BuildY', action: () => router.push('/buildy'), - class: 'bg-primary text-primary-foreground' + class: 'bg-primary text-white' }, { icon: LoaderCircle,