forked from coracle/flotilla
Lint, rename chat compose stuff
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {nip19} from 'nostr-tools'
|
||||
import {page} from "$app/stores"
|
||||
import {sort} from '@welshman/lib'
|
||||
import {displayRelayUrl} from '@welshman/util'
|
||||
import {sort} from "@welshman/lib"
|
||||
import {displayRelayUrl} from "@welshman/util"
|
||||
import {fly} from "@lib/transition"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
@@ -104,7 +103,8 @@
|
||||
{#each rooms as topic, i (topic)}
|
||||
<div transition:fly|local={{delay: 250 + i * 50}}>
|
||||
<SecondaryNavItem href={makeSpacePath(url, topic)}>
|
||||
<Icon icon="hashtag" /> {topic}
|
||||
<Icon icon="hashtag" />
|
||||
{topic}
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
import {subscribe, formatTimestampAsDate} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import GroupNote from "@app/components/GroupNote.svelte"
|
||||
import GroupCompose from "@app/components/GroupCompose.svelte"
|
||||
import {deriveChat, userMembership, MESSAGE, REPLY} from "@app/state"
|
||||
import ChatMessage from "@app/components/ChatMessage.svelte"
|
||||
import ChatCompose from "@app/components/ChatCompose.svelte"
|
||||
import {deriveChat, MESSAGE, REPLY} from "@app/state"
|
||||
|
||||
const {url, topic} = $page.params
|
||||
const chat = deriveChat(url)
|
||||
@@ -62,7 +62,7 @@
|
||||
onMount(() => {
|
||||
const since = now() - 30
|
||||
const kinds = [MESSAGE, REPLY]
|
||||
const filter = topic ? {kinds, since, "#t": [topic]} : {kinds, since} as Filter
|
||||
const filter = topic ? {kinds, since, "#t": [topic]} : ({kinds, since} as Filter)
|
||||
const sub = subscribe({filters: [filter], relays: [url]})
|
||||
|
||||
return () => sub.close()
|
||||
@@ -87,7 +87,7 @@
|
||||
<div class="h-px flex-grow bg-base-content opacity-25" />
|
||||
</div>
|
||||
{:else}
|
||||
<GroupNote event={assertEvent(value)} {showPubkey} />
|
||||
<ChatMessage event={assertEvent(value)} {showPubkey} />
|
||||
{/if}
|
||||
{/each}
|
||||
<p class="flex h-10 items-center justify-center py-20">
|
||||
@@ -100,5 +100,5 @@
|
||||
</Spinner>
|
||||
</p>
|
||||
</div>
|
||||
<GroupCompose {url} {topic} />
|
||||
<ChatCompose {url} {topic} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user