diff --git a/src/components/Discover/TopItem.vue b/src/components/Discover/TopItem.vue
index 0a6bb5f..fda2047 100644
--- a/src/components/Discover/TopItem.vue
+++ b/src/components/Discover/TopItem.vue
@@ -1,5 +1,5 @@
-
+
@@ -28,9 +28,9 @@ export default {
required: true,
},
},
- methods: {
- toUrl(url) {
- return `/${btoa(url)}`
+ computed: {
+ toUrl() {
+ return `/${btoa(this.link)}`
},
},
}
diff --git a/src/components/Feed/List.vue b/src/components/Feed/List.vue
index 3060d54..c212586 100644
--- a/src/components/Feed/List.vue
+++ b/src/components/Feed/List.vue
@@ -17,7 +17,7 @@
{{ format(new Date(episode.episodeDuration*1000), 'H:mm:ss') }}
-
+
@@ -73,6 +73,9 @@ export default {
methods: {
format,
formatTimeAgo,
+ play(episode) {
+ this.$store.commit('player/play', episode)
+ },
},
}
diff --git a/src/components/Player/Bar.vue b/src/components/Player/Bar.vue
index b712120..e275c87 100644
--- a/src/components/Player/Bar.vue
+++ b/src/components/Player/Bar.vue
@@ -1,7 +1,12 @@
-
- {{ 'oui' }}
-
+
+
+
diff --git a/src/modules/player.js b/src/modules/player.js
index ba0a621..10a67ec 100644
--- a/src/modules/player.js
+++ b/src/modules/player.js
@@ -1,11 +1,11 @@
export const player = {
namespaced: true,
state: {
- currentPlayingUrl: null,
+ episode: null,
},
mutations: {
- set: (state, currentPlayingUrl) => {
- state.currentPlayingUrl = currentPlayingUrl
+ play: (state, episode) => {
+ state.episode = episode
},
},
}
diff --git a/src/views/Index.vue b/src/views/Index.vue
index f7b6b33..c67bfa9 100644
--- a/src/views/Index.vue
+++ b/src/views/Index.vue
@@ -17,7 +17,7 @@
-
+