Skip to content

Commit

Permalink
Use title for feed, resource and document / segment
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalikL committed Sep 20, 2024
1 parent fe07c85 commit 3506248
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/Resources/Feed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
</template>

<script>
import { useTitle } from "@vueuse/core"
import FeedGroup from '@/components/Resources/FeedGroup.vue'
export default {
components: { FeedGroup },
props: ['feed'],
mounted () {
const title = useTitle()
title.value = `${this.feed.title}`
},
}
</script>
6 changes: 5 additions & 1 deletion src/views/Document.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import TableOfContents from '@/components/Resources/TableOfContents.vue'
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@heroicons/vue/24/solid'
import { Menu, MenuButton, MenuItems, MenuItem } from '@headlessui/vue'
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'
import { useTitle } from "@vueuse/core"
export default {
components: {
Expand Down Expand Up @@ -160,7 +161,10 @@ export default {
this.emitter.on('segment-click', async (v) => {
this.hiddenSegmentIndex = v
this.hiddenSegmentOpen = true
});
})
const title = useTitle()
title.value = `${this.selectedSegment.title} - ${this.resource.title}`
},
methods: {
loadFont (font) {
Expand Down
4 changes: 4 additions & 0 deletions src/views/Resource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</template>

<script>
import { useTitle } from "@vueuse/core"
import { authStore } from '@/stores/auth'
import ResourceItem from '../components/Resources/ResourceItem.vue'
import LoadingDetail from '@/components/Shimmer/LoadingDetail.vue'
Expand Down Expand Up @@ -58,6 +59,9 @@ export default {
await this.getResourceProgress()
await this.setRecent()
this.emitter.on('update-document-progress', this.updateDocumentProgress)
const title = useTitle()
title.value = `${this.resource.title}`
},
}
</script>

0 comments on commit 3506248

Please sign in to comment.