Add headline to singleton detail

This commit is contained in:
rijkvanzanten
2020-09-03 16:56:36 -04:00
parent 155bcbf7ee
commit afda504e77
2 changed files with 10 additions and 10 deletions

View File

@@ -9,7 +9,7 @@
<template #headline>
<v-breadcrumb v-if="bookmark" :items="breadcrumb" />
<v-breadcrumb v-else :items="[{ name: $t('collections'), to: collectionsLink }]" />
<v-breadcrumb v-else :items="[{ name: $t('collections'), to: '/collections' }]" />
</template>
<template #title-outer:append>
@@ -263,7 +263,7 @@ export default defineComponent({
const { selection } = useSelection();
const { info: currentCollection } = useCollection(collection);
const { addNewLink, batchLink, collectionsLink, currentCollectionLink } = useLinks();
const { addNewLink, batchLink, currentCollectionLink } = useLinks();
const { breadcrumb } = useBreadcrumb();
const {
@@ -313,7 +313,7 @@ export default defineComponent({
addNewLink,
batchDelete,
batchLink,
collectionsLink,
confirmDelete,
currentCollection,
deleting,
@@ -430,15 +430,11 @@ export default defineComponent({
return `/collections/${props.collection}/${batchPrimaryKeys}`;
});
const collectionsLink = computed<string>(() => {
return `/collections`;
});
const currentCollectionLink = computed<string>(() => {
return `/collections/${props.collection}`;
});
return { addNewLink, batchLink, collectionsLink, currentCollectionLink };
return { addNewLink, batchLink, currentCollectionLink };
}
function useBookmarks() {

View File

@@ -39,8 +39,12 @@
</v-button>
</template>
<template #headline v-if="collectionInfo.meta.singleton === false">
<v-breadcrumb :items="breadcrumb" />
<template #headline>
<v-breadcrumb
v-if="collectionInfo.meta.singleton === true"
:items="[{ name: $t('collections'), to: '/collections' }]"
/>
<v-breadcrumb v-else :items="breadcrumb" />
</template>
<template #actions>