mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-13 18:40:06 -04:00
Update src/
This commit is contained in:
parent
09b07e9b24
commit
86743c74f5
132 changed files with 4418 additions and 1907 deletions
30
src/components/FeedRemoveButton.svelte
Normal file
30
src/components/FeedRemoveButton.svelte
Normal file
|
@ -0,0 +1,30 @@
|
|||
<script lang="ts">
|
||||
import Button from '~/components/Button.svelte'
|
||||
import type { Feed } from '~/models'
|
||||
import * as Icon from '~/icons'
|
||||
import qs from 'qs'
|
||||
|
||||
export let feed: Feed
|
||||
export let onClick = () => {}
|
||||
|
||||
const endpoint = 'https://github.com/iptv-org/database/issues/new'
|
||||
const params = qs.stringify({
|
||||
labels: 'feeds:remove',
|
||||
template: '6_feeds_remove.yml',
|
||||
title: `Edit: ${feed.getDisplayName()}`,
|
||||
feed_id: feed.id,
|
||||
channel_id: feed.channelId
|
||||
})
|
||||
|
||||
const url = `${endpoint}?${params}`
|
||||
|
||||
function _onClick() {
|
||||
window.open(url, '_blank')
|
||||
onClick()
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button onClick={_onClick} label="Remove">
|
||||
<Icon.Remove slot="left" class="text-gray-400" size={20} />
|
||||
<Icon.ExternalLink slot="right" class="text-gray-400 dark:text-gray-500" size={17} />
|
||||
</Button>
|
Loading…
Add table
Add a link
Reference in a new issue