Update src/

This commit is contained in:
freearhey 2025-04-30 04:06:54 +03:00
parent e411cec545
commit 2a893a827b
33 changed files with 416 additions and 186 deletions

View file

@ -1,11 +1,11 @@
<script lang="ts">
import { CloseButton, StreamItem, Popup, Card } from '~/components'
import { Collection } from '@freearhey/core/browser'
import { CloseButton, StreamItem, Popup, Card, StreamAddIconButton } from '~/components'
import type { Context } from 'svelte-simple-modal'
import type { Feed } from '~/models'
import { getContext } from 'svelte'
import * as Icon from '~/icons'
export let streams: Collection = new Collection()
export let feed: Feed
export let title = 'Streams'
const { close } = getContext<Context>('simple-modal')
@ -23,11 +23,12 @@
<Icon.Stream size={21} />
</span>{title}
</div>
<div slot="headerRight">
<div slot="headerRight" class="inline-flex">
<StreamAddIconButton {feed} />
<CloseButton onClick={() => close()} />
</div>
<div slot="body" class="flex flex-col gap-2 p-2 sm:p-5">
{#each streams.all() as stream, index (stream.getUUID())}
{#each feed.getStreams().all() as stream (stream.getUUID())}
<StreamItem {stream} />
{/each}
</div>