Playlist: create navigation to the respective channel (#1347)

This commit is contained in:
PikachuEXE 2021-06-15 22:18:08 +08:00 committed by GitHub
parent 5ec5ef300f
commit 78b6adeb5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -8,12 +8,14 @@
.playlistChannel {
height: 70px;
/* Indicates the box can be clicked to navigate */
cursor: pointer;
}
.playlistChannel img {
width: 70px;
float: left;
cursor: pointer;
border-radius: 200px 200px 200px 200px;
-webkit-border-radius: 200px 200px 200px 200px;
}
@ -21,7 +23,6 @@
.playlistChannel h3 {
float: left;
position: relative;
cursor: pointer;
width: 200px;
margin-left: 10px;
top: 5px;

View File

@ -76,6 +76,7 @@ export default Vue.extend({
this.title = this.data.title
this.channelName = this.data.channelName
this.channelThumbnail = this.data.channelThumbnail
this.channelId = this.data.channelId
this.uploadedTime = this.data.uploaded_at
this.description = this.data.description
this.infoSource = this.data.infoSource
@ -112,6 +113,10 @@ export default Vue.extend({
}
},
goToChannel: function () {
this.$router.push({ path: `/channel/${this.channelId}` })
},
...mapActions([
'openExternalLink'
])

View File

@ -23,6 +23,7 @@
<hr>
<div
class="playlistChannel"
@click="goToChannel"
>
<img :src="channelThumbnail">
<h3>