Add back manage subscriptions

This commit is contained in:
WardPearce
2025-12-08 23:13:02 +13:00
parent 9175c22c5f
commit 40ab59da1c
2 changed files with 31 additions and 22 deletions
@@ -4,6 +4,8 @@
import { feedCacheStore } from '$lib/store';
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading';
import ItemsList from '$lib/components/ItemsList.svelte';
import { resolve } from '$app/paths';
import { _ } from '$lib/i18n';
let currentPage = 1;
let videos: (VideoBase | Video | PlaylistPageVideo)[] = $state($feedCacheStore.subscription);
@@ -21,6 +23,13 @@
}
</script>
<nav class="right-align">
<a class="button outline" href={resolve('/subscriptions/manage', {})}>
{$_('subscriptions.manageSubscriptions')}
</a>
</nav>
<div class="space"></div>
<ItemsList items={videos ?? []} />
<InfiniteLoading on:infinite={loadMore} />
@@ -34,31 +34,31 @@
}
</script>
<div class="space"></div>
<div class="padding">
<div class="max field suffix prefix small no-margin surface-variant">
<i class="front">search</i><input
bind:value={search}
oninput={searchSubs}
type="text"
placeholder={$_('searchPlaceholder')}
/>
</div>
<div class="max field suffix prefix small no-margin surface-variant">
<i class="front">search</i><input
bind:value={search}
oninput={searchSubs}
type="text"
placeholder={$_('searchPlaceholder')}
/>
{#each subscriptions as sub (sub.authorId)}
<article>
<nav>
<a href={resolve(`/channel/[authorId]`, { authorId: sub.authorId })}
><h6>
{sub.author}
</h6></a
>
<div class="max"></div>
<button onclick={async () => unsubscribe(sub.authorId)} class="border">Unsubscribe</button>
</nav>
</article>
{/each}
</div>
{#each subscriptions as sub (sub.authorId)}
<article>
<nav>
<a href={resolve(`/channel/[authorId]`, { authorId: sub.authorId })}
><h6>
{sub.author}
</h6></a
>
<div class="max"></div>
<button onclick={async () => unsubscribe(sub.authorId)} class="border">Unsubscribe</button>
</nav>
</article>
{/each}
<style>
@media screen and (max-width: 590px) {
nav {