mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
add preferListen prop to VideoItem.vue
If set to true, the item will redirect to the listen=1 url. Also, the "Listen to ..." button will adjust to redirect to the video version.
This commit is contained in:
parent
6275202f2c
commit
7df80d1675
1 changed files with 6 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
||||||
v: item.url.substr(-11),
|
v: item.url.substr(-11),
|
||||||
...(playlistId && { list: playlistId }),
|
...(playlistId && { list: playlistId }),
|
||||||
...(index >= 0 && { index: index + 1 }),
|
...(index >= 0 && { index: index + 1 }),
|
||||||
|
...(preferListen && { listen: 1 }),
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
@ -99,13 +100,13 @@
|
||||||
v: item.url.substr(-11),
|
v: item.url.substr(-11),
|
||||||
...(playlistId && { list: playlistId }),
|
...(playlistId && { list: playlistId }),
|
||||||
...(index >= 0 && { index: index + 1 }),
|
...(index >= 0 && { index: index + 1 }),
|
||||||
listen: '1',
|
...(!preferListen && { listen: 1 }),
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
:aria-label="'Listen to ' + title"
|
:aria-label="preferListen ? title : 'Listen to ' + title"
|
||||||
:title="'Listen to ' + title"
|
:title="preferListen ? title : 'Listen to ' + title"
|
||||||
>
|
>
|
||||||
<font-awesome-icon icon="headphones" />
|
<font-awesome-icon :icon="preferListen ? 'tv' : 'headphones'" />
|
||||||
</router-link>
|
</router-link>
|
||||||
<button :title="$t('actions.add_to_playlist')" @click="showPlaylistModal = !showPlaylistModal">
|
<button :title="$t('actions.add_to_playlist')" @click="showPlaylistModal = !showPlaylistModal">
|
||||||
<font-awesome-icon icon="circle-plus" />
|
<font-awesome-icon icon="circle-plus" />
|
||||||
|
@ -167,6 +168,7 @@ export default {
|
||||||
hideChannel: { type: Boolean, default: false },
|
hideChannel: { type: Boolean, default: false },
|
||||||
index: { type: Number, default: -1 },
|
index: { type: Number, default: -1 },
|
||||||
playlistId: { type: String, default: null },
|
playlistId: { type: String, default: null },
|
||||||
|
preferListen: { type: Boolean, default: false },
|
||||||
admin: { type: Boolean, default: false },
|
admin: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
emits: ["remove"],
|
emits: ["remove"],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue