diff --git a/frontend/src/components/VAudioDetails/VRelatedAudio.vue b/frontend/src/components/VAudioDetails/VRelatedAudio.vue deleted file mode 100644 index 2c22ce6afa0..00000000000 --- a/frontend/src/components/VAudioDetails/VRelatedAudio.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/frontend/src/components/VCollectionPage.vue b/frontend/src/components/VCollectionPage.vue index 3bca3fa7923..6b70974b2cf 100644 --- a/frontend/src/components/VCollectionPage.vue +++ b/frontend/src/components/VCollectionPage.vue @@ -7,7 +7,7 @@ :media-type="mediaType" :class="mediaType === 'image' ? 'mb-4' : 'mb-2'" /> - , diff --git a/frontend/src/components/VImageDetails/VRelatedImages.vue b/frontend/src/components/VImageDetails/VRelatedImages.vue deleted file mode 100644 index 954b620e0bb..00000000000 --- a/frontend/src/components/VImageDetails/VRelatedImages.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/frontend/src/components/VMediaInfo/VRelatedMedia.vue b/frontend/src/components/VMediaInfo/VRelatedMedia.vue new file mode 100644 index 00000000000..77cbca6d7c6 --- /dev/null +++ b/frontend/src/components/VMediaInfo/VRelatedMedia.vue @@ -0,0 +1,105 @@ + + + diff --git a/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue b/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue index 2c657caf92b..23f0caf8e86 100644 --- a/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue +++ b/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue @@ -51,7 +51,7 @@ :search-term="searchTerm" layout="box" :size="isSm ? 'l' : 's'" - :is-related="false" + kind="search" /> diff --git a/frontend/src/components/VSearchResultsGrid/VAudioCollection.vue b/frontend/src/components/VSearchResultsGrid/VAudioCollection.vue index db3f04ab70a..5bc9492ae5b 100644 --- a/frontend/src/components/VSearchResultsGrid/VAudioCollection.vue +++ b/frontend/src/components/VSearchResultsGrid/VAudioCollection.vue @@ -1,44 +1,36 @@ diff --git a/frontend/src/components/VSearchResultsGrid/VAudioList.vue b/frontend/src/components/VSearchResultsGrid/VAudioList.vue index fe7618e32f1..fb116ecb4b7 100644 --- a/frontend/src/components/VSearchResultsGrid/VAudioList.vue +++ b/frontend/src/components/VSearchResultsGrid/VAudioList.vue @@ -1,47 +1,88 @@ + + diff --git a/frontend/src/components/VSearchResultsGrid/VMediaCollection.vue b/frontend/src/components/VSearchResultsGrid/VMediaCollection.vue new file mode 100644 index 00000000000..062e1639a03 --- /dev/null +++ b/frontend/src/components/VSearchResultsGrid/VMediaCollection.vue @@ -0,0 +1,105 @@ + + diff --git a/frontend/src/pages/audio/_id/index.vue b/frontend/src/pages/audio/_id/index.vue index e117a3f8a85..7722adb40be 100644 --- a/frontend/src/pages/audio/_id/index.vue +++ b/frontend/src/pages/audio/_id/index.vue @@ -28,8 +28,11 @@ - @@ -60,7 +63,7 @@ import { useSingleResultPageMeta } from "~/composables/use-single-result-page-me import VAudioTrack from "~/components/VAudioTrack/VAudioTrack.vue" import VMediaReuse from "~/components/VMediaInfo/VMediaReuse.vue" -import VRelatedAudio from "~/components/VAudioDetails/VRelatedAudio.vue" +import VRelatedMedia from "~/components/VMediaInfo/VRelatedMedia.vue" import VMediaDetails from "~/components/VMediaInfo/VMediaDetails.vue" import VSafetyWall from "~/components/VSafetyWall/VSafetyWall.vue" import VSingleResultControls from "~/components/VSingleResultControls.vue" @@ -77,7 +80,7 @@ export default defineComponent({ VMediaDetails, VAudioTrack, VMediaReuse, - VRelatedAudio, + VRelatedMedia, }, layout: "content-layout", middleware: singleResultMiddleware, @@ -89,7 +92,12 @@ export default defineComponent({ const route = useRoute() - const audio = ref(singleResultStore.audio) + const audio = ref( + singleResultStore.audio?.id && + singleResultStore.audio.id === route.value.params.id + ? singleResultStore.audio + : null + ) const fetchingError = computed( () => singleResultStore.fetchState.fetchingError ) diff --git a/frontend/src/pages/image/_id/index.vue b/frontend/src/pages/image/_id/index.vue index 4b1d54872ed..540d1b11aad 100644 --- a/frontend/src/pages/image/_id/index.vue +++ b/frontend/src/pages/image/_id/index.vue @@ -97,12 +97,13 @@ :image-height="imageHeight" :image-type="imageType" /> - + + @@ -119,7 +120,7 @@ import { useRoute, } from "@nuxtjs/composition-api" -import { IMAGE, isAdditionalSearchType } from "~/constants/media" +import { IMAGE } from "~/constants/media" import { skipToContentTargetId } from "~/constants/window" import type { ImageDetail } from "~/types/media" import { useAnalytics } from "~/composables/use-analytics" @@ -134,14 +135,13 @@ import { singleResultMiddleware } from "~/middleware/single-result" import VBone from "~/components/VSkeleton/VBone.vue" import VLink from "~/components/VLink.vue" import VMediaReuse from "~/components/VMediaInfo/VMediaReuse.vue" -import VRelatedImages from "~/components/VImageDetails/VRelatedImages.vue" +import VRelatedMedia from "~/components/VMediaInfo/VRelatedMedia.vue" import VSketchFabViewer from "~/components/VSketchFabViewer.vue" import VSafetyWall from "~/components/VSafetyWall/VSafetyWall.vue" import VSingleResultControls from "~/components/VSingleResultControls.vue" import VMediaDetails from "~/components/VMediaInfo/VMediaDetails.vue" import VGetMediaButton from "~/components/VMediaInfo/VGetMediaButton.vue" import VMediaInfo from "~/components/VMediaInfo/VMediaInfo.vue" - import VErrorSection from "~/components/VErrorSection/VErrorSection.vue" import errorImage from "~/assets/image_not_available_placeholder.png" @@ -158,7 +158,7 @@ export default defineComponent({ VBone, VLink, VMediaReuse, - VRelatedImages, + VRelatedMedia, VSketchFabViewer, }, layout: "content-layout", @@ -168,7 +168,12 @@ export default defineComponent({ const route = useRoute() - const image = ref(singleResultStore.image) + const image = ref( + singleResultStore.image?.id && + singleResultStore.image.id === route.value.params.id + ? singleResultStore.image + : null + ) const fetchingError = computed( () => singleResultStore.fetchState.fetchingError ) @@ -341,7 +346,6 @@ export default defineComponent({ }, // Necessary for useMeta head: {}, - methods: { isAdditionalSearchType }, // Fetching on the server is disabled because it is // handled by the `singleResultMiddleware`. fetchOnServer: false, @@ -349,8 +353,7 @@ export default defineComponent({ diff --git a/frontend/src/pages/search/audio.vue b/frontend/src/pages/search/audio.vue index c76494639c1..e35bc8defbb 100644 --- a/frontend/src/pages/search/audio.vue +++ b/frontend/src/pages/search/audio.vue @@ -1,5 +1,5 @@