mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-11 17:40:05 -04:00
Update BlockedBadge.svelte
This commit is contained in:
parent
cff58b10b1
commit
618f9c6dd0
1 changed files with 9 additions and 1 deletions
|
@ -3,12 +3,20 @@
|
||||||
|
|
||||||
export let channel
|
export let channel
|
||||||
|
|
||||||
|
let reason
|
||||||
|
const messages = {
|
||||||
|
dmca: 'The channel has been added to our blocklist due to the claims of the copyright holder',
|
||||||
|
nsfw: 'The channel has been added to our blocklist due to NSFW content'
|
||||||
|
}
|
||||||
|
|
||||||
const blocklistRefs = channel.blocklist_records
|
const blocklistRefs = channel.blocklist_records
|
||||||
.map(record => {
|
.map(record => {
|
||||||
const parts = record.ref.split('/')
|
const parts = record.ref.split('/')
|
||||||
const issueId = parts.pop()
|
const issueId = parts.pop()
|
||||||
const prefix = record.ref.includes('/issues/') ? '#' : ''
|
const prefix = record.ref.includes('/issues/') ? '#' : ''
|
||||||
|
|
||||||
|
reason = record.reason
|
||||||
|
|
||||||
return `<a class="underline" target="_blank" rel="noreferrer" href="${record.ref}">${prefix}${issueId}</a>`
|
return `<a class="underline" target="_blank" rel="noreferrer" href="${record.ref}">${prefix}${issueId}</a>`
|
||||||
})
|
})
|
||||||
.join(', ')
|
.join(', ')
|
||||||
|
@ -17,7 +25,7 @@
|
||||||
<div
|
<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"
|
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={{
|
use:tippy={{
|
||||||
content: `The channel has been added to our blocklist due to the claims of the copyright holder: ${blocklistRefs}`,
|
content: `${messages[reason]}: ${blocklistRefs}`,
|
||||||
allowHTML: true,
|
allowHTML: true,
|
||||||
placement: 'right',
|
placement: 'right',
|
||||||
interactive: true
|
interactive: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue