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