diff --git a/src/components/Feed/Episode.vue b/src/components/Feed/Episode.vue
index d6ef43e..65d71b1 100644
--- a/src/components/Feed/Episode.vue
+++ b/src/components/Feed/Episode.vue
@@ -33,7 +33,7 @@
-
+
+ :url="episode.image"
+ @click.stop="$emit('select', episode)">
+
+
+
+
EpisodeInterface,
required: true,
@@ -150,11 +161,16 @@ export default {
type: Boolean,
default: false,
},
+ selected: {
+ type: Boolean,
+ default: false,
+ },
url: {
type: String,
required: true,
},
},
+ emits: ['select'],
data: () => ({
loading: false,
modalEpisode: null as EpisodeInterface | null,
diff --git a/src/components/Feed/Episodes.vue b/src/components/Feed/Episodes.vue
index ed089f0..2ce29c1 100644
--- a/src/components/Feed/Episodes.vue
+++ b/src/components/Feed/Episodes.vue
@@ -5,8 +5,11 @@
+ :selected="selected.includes(episode)"
+ :url="url"
+ @select="select" />
@@ -34,6 +37,7 @@ export default {
data: () => ({
episodes: [] as EpisodeInterface[],
loading: true,
+ selected: [] as EpisodeInterface[],
}),
computed: {
...mapState(usePlayer, ['episode']),
@@ -88,6 +92,13 @@ export default {
methods: {
hasEnded,
isListening,
+ select(episode: EpisodeInterface) {
+ if (this.selected.includes(episode)) {
+ this.selected = this.selected.filter((e) => e !== episode)
+ } else {
+ this.selected.push(episode)
+ }
+ },
},
}