Skip to content

Commit

Permalink
show recommendations as own sections & correctly play single track
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Mar 25, 2024
1 parent 869f838 commit 1dec077
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/DocumentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const convertModels = (models: IAllDocumentModels[]) => {
items: currentSection,
useFlex: el.useCoverCarousel === true,
});
} else if (i === 0) {
} else if (i === 0 || el.type === "recommendation") {
currentSection = [el];
result.push({
header: null,
Expand Down
5 changes: 3 additions & 2 deletions components/RecommendationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import type { RecommendationModel } from "@bcc-code/bmm-sdk-fetch";
const { t } = useI18n();
const { setQueue } = useNuxtApp().$mediaPlayer;
defineProps<{
item: RecommendationModel;
}>();
</script>

<template>
<div class="col-span-full bg-background-2 my-2 rounded-2xl border-t-0">
{{ console.log("item", item) }}
<div class="col-span-full bg-background-2 rounded-2xl border-t-0">
<div class="p-4">
<div
v-if="!item.title && !item.subtitle"
Expand All @@ -33,6 +33,7 @@ defineProps<{
:track="item.track"
is-track-type-known
show-thumbnail
@play-track="setQueue([item.track])"
/>
<GenericListItem
v-else-if="item.album"
Expand Down

0 comments on commit 1dec077

Please sign in to comment.