feat(userbot,api,frontend): file links, media downloads, story hold-pause, drop scheduled dupes
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import { enqueueStoriesBackfill, getStories } from "$lib/api/endpoints";
|
||||
import { loadStoryMedia } from "$lib/api/stories";
|
||||
import type { StoryView } from "$lib/api/types";
|
||||
import StoryTile from "$lib/components/stories/StoryTile.svelte";
|
||||
import StoryViewer from "$lib/components/stories/StoryViewer.svelte";
|
||||
import Button from "$lib/components/ui/Button.svelte";
|
||||
import EmptyState from "$lib/components/ui/EmptyState.svelte";
|
||||
@@ -161,39 +162,11 @@
|
||||
{:else}
|
||||
<div class="grid">
|
||||
{#each items as item, index (item.story_id)}
|
||||
<button
|
||||
type="button"
|
||||
class="tile"
|
||||
class:expired={item.deleted}
|
||||
onclick={() => openViewer(index)}
|
||||
>
|
||||
{#if previews[item.story_id]}
|
||||
{#if item.media_kind === "video"}
|
||||
<video
|
||||
src={previews[item.story_id]}
|
||||
muted
|
||||
playsinline
|
||||
preload="metadata"
|
||||
use:poster
|
||||
></video>
|
||||
<span class="play"><Icon name="play" size="1.5rem" /></span>
|
||||
{:else}
|
||||
<img src={previews[item.story_id]} alt="">
|
||||
{/if}
|
||||
{:else}
|
||||
<span class="ph"><Icon name="play-story" /></span>
|
||||
{/if}
|
||||
{#if item.pinned}
|
||||
<span class="badge pin"
|
||||
><Icon name="story-priority" size="0.875rem" /></span
|
||||
>
|
||||
{/if}
|
||||
{#if item.views}
|
||||
<span class="badge views">
|
||||
<Icon name="eye" size="0.875rem" />{item.views}
|
||||
</span>
|
||||
{/if}
|
||||
</button>
|
||||
<StoryTile
|
||||
story={item}
|
||||
preview={previews[item.story_id]}
|
||||
onopen={() => openViewer(index)}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user