mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-10 17:10:06 -04:00
Create BlockedBadge.svelte
This commit is contained in:
parent
304e70313d
commit
8f33531cdb
1 changed files with 30 additions and 0 deletions
30
src/components/BlockedBadge.svelte
Normal file
30
src/components/BlockedBadge.svelte
Normal file
|
@ -0,0 +1,30 @@
|
|||
<script>
|
||||
import tippy from 'sveltejs-tippy'
|
||||
|
||||
export let channel
|
||||
|
||||
const blocklistRefs = channel.blocklist_records
|
||||
.map(record => {
|
||||
const parts = record.ref.split('/')
|
||||
const issueId = parts.pop()
|
||||
const prefix = record.ref.includes('/issues/') ? '#' : ''
|
||||
|
||||
return `<a class="underline" target="_blank" rel="noreferrer" href="${record.ref}">${prefix}${issueId}</a>`
|
||||
})
|
||||
.join(', ')
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="text-gray-500 border-[1px] border-gray-200 text-xs inline-flex items-center px-2.5 py-0.5 dark:text-gray-300 rounded-full"
|
||||
use:tippy={{
|
||||
content: `The channel has been added to our blocklist due to the claims of the copyright holder: ${blocklistRefs}`,
|
||||
allowHTML: true,
|
||||
placement: 'right',
|
||||
interactive: true
|
||||
}}
|
||||
href={channel.blocklist_ref}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Blocked
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue