Fix double focus on the sidebar channels (#2749)

This commit is contained in:
absidue 2022-10-20 08:04:49 +02:00 committed by GitHub
parent 2c5c654b66
commit f33ad2e5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 27 deletions

View File

@ -69,7 +69,6 @@
.navOption .navLabel {
margin-left: 40px;
overflow: hidden;
margin-left: 40px;
word-break: break-word;
}
@ -90,6 +89,7 @@
}
.channelLink {
display: block;
color: inherit;
text-decoration: inherit;
}
@ -97,6 +97,7 @@
.channelThumbnail {
border-radius: 50%;
width: 35px;
vertical-align: middle;
}
.closed {

View File

@ -76,9 +76,6 @@ export default Vue.extend({
methods: {
navigate: function (route) {
this.$router.push('/' + route)
},
goToChannel: function (id) {
this.$router.push({ path: `/channel/${id}` })
}
}
})

View File

@ -218,36 +218,29 @@
<div
v-if="!hideActiveSubscriptions"
>
<div
<router-link
v-for="(channel, index) in activeSubscriptions"
:key="index"
class="navChannel mobileHidden"
:to="`/channel/${channel.id}`"
class="navChannel channelLink mobileHidden"
:title="channel.name"
role="button"
tabindex="0"
@keydown.enter.prevent="goToChannel(channel.id)"
@click="goToChannel(channel.id)"
>
<router-link
:to="`/channel/${channel.id}`"
class="channelLink"
<div
class="thumbnailContainer"
>
<div
class="thumbnailContainer"
<img
class="channelThumbnail"
:src="channel.thumbnail"
>
<img
class="channelThumbnail"
:src="channel.thumbnail"
>
</div>
<p
v-if="isOpen"
class="navLabel"
>
{{ channel.name }}
</p>
</router-link>
</div>
</div>
<p
v-if="isOpen"
class="navLabel"
>
{{ channel.name }}
</p>
</router-link>
</div>
</div>
</ft-flex-box>