Skip to content

Commit

Permalink
Merge pull request #2782 from Bnyro/master
Browse files Browse the repository at this point in the history
feat: support for video metainfo
  • Loading branch information
Bnyro authored Aug 7, 2023
2 parents fc515b6 + 5f4f793 commit abffb4a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/WatchVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,19 @@
</div>
</div>

<hr />
<hr class="mb-2" />

<div
v-for="metaInfo in video?.metaInfo ?? []"
:key="metaInfo.title"
class="btn px-4 py-2 flex flex-wrap gap-2 my-3 cursor-default"
>
<span>{{ metaInfo.description ?? metaInfo.title }}</span>
<a v-for="(link, linkIndex) in metaInfo.urls" :key="linkIndex" :href="link" class="underline">{{
metaInfo.urlTexts[linkIndex]
}}</a>
<br />
</div>
<button
v-t="`actions.${showDesc ? 'minimize_description' : 'show_description'}`"
Expand All @@ -158,9 +170,10 @@
</span>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-show="showDesc" class="break-words description" v-html="purifiedDescription" />
<template v-if="showDesc">
<div class="break-words description" v-html="purifiedDescription" />

Check warning on line 174 in src/components/WatchVideo.vue

View workflow job for this annotation

GitHub Actions / build

'v-html' directive can lead to XSS attack

Check warning on line 174 in src/components/WatchVideo.vue

View workflow job for this annotation

GitHub Actions / build

'v-html' directive can lead to XSS attack

Check warning on line 174 in src/components/WatchVideo.vue

View workflow job for this annotation

GitHub Actions / build

'v-html' directive can lead to XSS attack

Check warning on line 174 in src/components/WatchVideo.vue

View workflow job for this annotation

GitHub Actions / build

'v-html' directive can lead to XSS attack

Check warning on line 174 in src/components/WatchVideo.vue

View workflow job for this annotation

GitHub Actions / build-docker-image

'v-html' directive can lead to XSS attack

Check warning on line 174 in src/components/WatchVideo.vue

View workflow job for this annotation

GitHub Actions / build-docker-image

'v-html' directive can lead to XSS attack
<br />
<div
v-if="sponsors && sponsors.segments"
v-text="`${$t('video.sponsor_segments')}: ${sponsors.segments.length}`"
Expand Down

0 comments on commit abffb4a

Please sign in to comment.