Fix before refacto player
This commit is contained in:
parent
fb21092dff
commit
e1e93771ff
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<router-link :to="toUrl(link)">
|
||||
<router-link :to="toUrl">
|
||||
<img :alt="`${title} - ${author}`"
|
||||
:src="imageUrl"
|
||||
:title="author">
|
||||
@ -28,9 +28,9 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toUrl(url) {
|
||||
return `/${btoa(url)}`
|
||||
computed: {
|
||||
toUrl() {
|
||||
return `/${btoa(this.link)}`
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
{{ format(new Date(episode.episodeDuration*1000), 'H:mm:ss') }}
|
||||
</template>
|
||||
<template #actions>
|
||||
<NcActionButton>
|
||||
<NcActionButton @click="play(episode)">
|
||||
<template #icon>
|
||||
<Play :size="20" />
|
||||
</template>
|
||||
@ -73,6 +73,9 @@ export default {
|
||||
methods: {
|
||||
format,
|
||||
formatTimeAgo,
|
||||
play(episode) {
|
||||
this.$store.commit('player/play', episode)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div v-if="currentPlayingUrl" class="oui">
|
||||
<fragment>
|
||||
<div v-if="episode" class="footer">
|
||||
<img class="background" :src="episode.episodeImage">
|
||||
<div class="content">
|
||||
{{ 'oui' }}
|
||||
</div>
|
||||
</div>
|
||||
</fragment>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -9,20 +14,29 @@ export default {
|
||||
name: 'Bar',
|
||||
components: {},
|
||||
computed: {
|
||||
currentPlayingUrl() {
|
||||
return this.$store.state.currentPlayingUrl
|
||||
episode() {
|
||||
return this.$store.state.player.episode
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.oui {
|
||||
.footer {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.background {
|
||||
filter: blur(5rem) brightness(50%);
|
||||
height: auto;
|
||||
left: 0;
|
||||
opacity: .4;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 4rem;
|
||||
background-color: red;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
@ -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
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</ul>
|
||||
</NcAppContentList>
|
||||
</NcAppNavigation>
|
||||
<router-view />
|
||||
<router-view :key="$route.path" />
|
||||
<Bar />
|
||||
</fragment>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user