feat: respect listen mode in recommended videos (#3430)

This commit is contained in:
Max.-F. Helm
2024-03-19 22:20:02 +01:00
committed by GitHub
parent 00c15cb8a7
commit 113e643c55
3 changed files with 14 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
v: item.url.substr(-11),
...(playlistId && { list: playlistId }),
...(index >= 0 && { index: index + 1 }),
...(preferListen && { listen: 1 }),
},
}"
>
@@ -99,13 +100,13 @@
v: item.url.substr(-11),
...(playlistId && { list: playlistId }),
...(index >= 0 && { index: index + 1 }),
listen: '1',
...(!preferListen && { listen: 1 }),
},
}"
:aria-label="'Listen to ' + title"
:title="'Listen to ' + title"
:aria-label="preferListen ? title : 'Listen to ' + title"
:title="preferListen ? title : 'Listen to ' + title"
>
<i class="i-fa6-solid:headphones" />
<font-awesome-icon :icon="preferListen ? 'i-fa6-solid:tv' : 'i-fa6-solid:headphones'" />
</router-link>
<button :title="$t('actions.add_to_playlist')" @click="showPlaylistModal = !showPlaylistModal">
<i class="i-fa6-solid:circle-plus" />
@@ -167,6 +168,7 @@ export default {
hideChannel: { type: Boolean, default: false },
index: { type: Number, default: -1 },
playlistId: { type: String, default: null },
preferListen: { type: Boolean, default: false },
admin: { type: Boolean, default: false },
},
emits: ["remove"],