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
e411cec545
commit
2a893a827b
33 changed files with 416 additions and 186 deletions
23
src/components/ChannelMenu.svelte
Normal file
23
src/components/ChannelMenu.svelte
Normal file
|
@ -0,0 +1,23 @@
|
|||
<script lang="ts">
|
||||
import { ChannelRemoveButton, ChannelEditButton, CopyLinkButton, Menu } from '~/components'
|
||||
import { toast } from '@zerodevx/svelte-toast'
|
||||
import type { Channel } from '~/models'
|
||||
|
||||
export let channel: Channel
|
||||
|
||||
let isMenuOpened = false
|
||||
function closeMenu() {
|
||||
isMenuOpened = false
|
||||
}
|
||||
|
||||
function onLinkCopy() {
|
||||
toast.push('Link copied to clipboard')
|
||||
closeMenu()
|
||||
}
|
||||
</script>
|
||||
|
||||
<Menu bind:isOpened={isMenuOpened}>
|
||||
<CopyLinkButton link={channel.getPageUrl()} onCopy={onLinkCopy} />
|
||||
<ChannelEditButton {channel} onClick={closeMenu} />
|
||||
<ChannelRemoveButton {channel} onClick={closeMenu} />
|
||||
</Menu>
|
Loading…
Add table
Add a link
Reference in a new issue