Populate feeds with default accounts

This commit is contained in:
Jon Staab
2024-10-11 15:29:54 -07:00
parent e21063f247
commit f5461d551e
6 changed files with 30 additions and 17 deletions
+5 -6
View File
@@ -113,15 +113,14 @@
{/if}
</div>
<div slot="action">
{#if $missingInboxes.length > 0}
{@const plural = $missingInboxes.length > 0}
{#if remove($pubkey, $missingInboxes).length > 0}
{@const count = remove($pubkey, $missingInboxes).length}
{@const label = count > 0 ? 'inboxes are' : 'inbox is'}
<div
class="row-2 badge badge-error badge-lg tooltip tooltip-left cursor-pointer"
data-tip="{$missingInboxes.length} {plural
? 'inboxes are'
: 'inbox is'} not configured.">
data-tip="{count} {label} not configured.">
<Icon icon="danger" />
{$missingInboxes.length}
{count}
</div>
{/if}
</div>
+10
View File
@@ -13,6 +13,8 @@
import type {TrustedEvent} from "@welshman/util"
import {deriveEvents} from "@welshman/store"
import {repository, userFollows, load} from "@welshman/app"
import Link from "@lib/components/Link.svelte"
import Icon from "@lib/components/Icon.svelte"
import Spinner from "@lib/components/Spinner.svelte"
import NoteCard from "@app/components/NoteCard.svelte"
import Content from "@app/components/Content.svelte"
@@ -85,6 +87,14 @@
<Content {event} />
</div>
</NoteCard>
{:else}
<div class="py-20 max-w-sm col-4 items-center m-auto text-center">
<p>No activity found! Try following a few more people.</p>
<Link class="btn btn-primary" href="/home/people">
<Icon icon="user-heart" />
Browse Profiles
</Link>
</div>
{/each}
</div>
{/await}
+6 -3
View File
@@ -1,14 +1,17 @@
<script lang="ts">
import {onMount} from "svelte"
import {createScroller} from "@lib/html"
import Icon from "@lib/components/Icon.svelte"
import {shuffle} from "@welshman/lib"
import {uniq, shuffle} from "@welshman/lib"
import {getPubkeyTagValues, getListTags} from "@welshman/util"
import {profileSearch, userFollows} from "@welshman/app"
import Icon from "@lib/components/Icon.svelte"
import PageHeader from "@lib/components/PageHeader.svelte"
import PeopleItem from "@app/components/PeopleItem.svelte"
const defaultPubkeys = shuffle(getPubkeyTagValues(getListTags($userFollows)))
const defaultPubkeys = uniq([
...shuffle(getPubkeyTagValues(getListTags($userFollows))),
...import.meta.env.VITE_DEFAULT_PUBKEYS.split(','),
])
let term = ""
let limit = 10