diff --git a/next-ui/src/components/library/LibraryNavigation.vue b/next-ui/src/components/library/LibraryNavigation.vue index 90f6376a..376fdb4f 100644 --- a/next-ui/src/components/library/LibraryNavigation.vue +++ b/next-ui/src/components/library/LibraryNavigation.vue @@ -7,6 +7,7 @@ diff --git a/next-ui/src/components/library/TabNavigation.stories.ts b/next-ui/src/components/library/TabNavigation.stories.ts index afcec306..3546809b 100644 --- a/next-ui/src/components/library/TabNavigation.stories.ts +++ b/next-ui/src/components/library/TabNavigation.stories.ts @@ -20,7 +20,9 @@ const meta = { }, }, }, - args: {}, + args: { + libraryId: 'all', + }, } satisfies Meta export default meta diff --git a/next-ui/src/components/library/TabNavigation.vue b/next-ui/src/components/library/TabNavigation.vue index e1e89684..4b2fc167 100644 --- a/next-ui/src/components/library/TabNavigation.vue +++ b/next-ui/src/components/library/TabNavigation.vue @@ -1,26 +1,96 @@ diff --git a/next-ui/src/composables/libraries.ts b/next-ui/src/composables/libraries.ts index 7bd0a8b5..8c40f2c0 100644 --- a/next-ui/src/composables/libraries.ts +++ b/next-ui/src/composables/libraries.ts @@ -33,8 +33,17 @@ export function useGetLibrariesById(libraryId: MaybeRefOrGetter) { const libIds = computed(() => libs.value?.map((it) => it.id)) + const isPinned = computed(() => toValue(libraryId) === 'pinned') + const isUnpinned = computed(() => toValue(libraryId) === 'unpinned') + const isAll = computed(() => toValue(libraryId) === 'all') + const isSingle = computed(() => !isPinned.value && !isUnpinned.value && !isAll.value) + return { libraries: libs, libraryIds: libIds, + isPinned, + isUnpinned, + isAll, + isSingle, } }