forked from coracle/flotilla
Rename ThreadReply to EventReply
This commit is contained in:
@@ -12,11 +12,9 @@
|
|||||||
const {
|
const {
|
||||||
url,
|
url,
|
||||||
event,
|
event,
|
||||||
hideActions = false,
|
|
||||||
}: {
|
}: {
|
||||||
url: string
|
url: string
|
||||||
event: TrustedEvent
|
event: TrustedEvent
|
||||||
hideActions?: boolean
|
|
||||||
} = $props()
|
} = $props()
|
||||||
|
|
||||||
const meta = $derived(fromPairs(event.tags) as Record<string, string>)
|
const meta = $derived(fromPairs(event.tags) as Record<string, string>)
|
||||||
@@ -40,8 +38,6 @@
|
|||||||
<Content {event} expandMode="inline" quoteProps={{relays: [url]}} />
|
<Content {event} expandMode="inline" quoteProps={{relays: [url]}} />
|
||||||
<div class="flex w-full flex-col items-end justify-between gap-2 sm:flex-row">
|
<div class="flex w-full flex-col items-end justify-between gap-2 sm:flex-row">
|
||||||
<EventPostedBy {event} />
|
<EventPostedBy {event} />
|
||||||
{#if !hideActions}
|
<CalendarEventActions showActivity {url} {event} />
|
||||||
<CalendarEventActions showActivity {url} {event} />
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -11,11 +11,9 @@
|
|||||||
const {
|
const {
|
||||||
url,
|
url,
|
||||||
event,
|
event,
|
||||||
hideActions = false,
|
|
||||||
}: {
|
}: {
|
||||||
url: string
|
url: string
|
||||||
event: TrustedEvent
|
event: TrustedEvent
|
||||||
hideActions?: boolean
|
|
||||||
} = $props()
|
} = $props()
|
||||||
|
|
||||||
const title = event.tags.find(nthEq(0, "title"))?.[1]
|
const title = event.tags.find(nthEq(0, "title"))?.[1]
|
||||||
@@ -37,8 +35,6 @@
|
|||||||
<Content {event} expandMode="inline" quoteProps={{relays: [url]}} />
|
<Content {event} expandMode="inline" quoteProps={{relays: [url]}} />
|
||||||
<div class="flex w-full flex-col items-end justify-between gap-2 sm:flex-row">
|
<div class="flex w-full flex-col items-end justify-between gap-2 sm:flex-row">
|
||||||
<EventPostedBy {event} />
|
<EventPostedBy {event} />
|
||||||
{#if !hideActions}
|
<ThreadActions showActivity {url} {event} />
|
||||||
<ThreadActions showActivity {url} {event} />
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
import Content from "@app/components/Content.svelte"
|
import Content from "@app/components/Content.svelte"
|
||||||
import NoteCard from "@app/components/NoteCard.svelte"
|
import NoteCard from "@app/components/NoteCard.svelte"
|
||||||
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
|
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
|
||||||
import ThreadActions from "@app/components/ThreadActions.svelte"
|
import CalendarEventActions from "@app/components/CalendarEventActions.svelte"
|
||||||
import ThreadReply from "@app/components/ThreadReply.svelte"
|
import EventReply from "@app/components/EventReply.svelte"
|
||||||
import {deriveEvent, decodeRelay} from "@app/state"
|
import {deriveEvent, decodeRelay} from "@app/state"
|
||||||
import {setChecked} from "@app/notifications"
|
import {setChecked} from "@app/notifications"
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<div class="flex justify-end px-2 pb-2">
|
<div class="flex justify-end px-2 pb-2">
|
||||||
<Button class="btn btn-primary" onclick={openReply}>
|
<Button class="btn btn-primary" onclick={openReply}>
|
||||||
<Icon icon="reply" />
|
<Icon icon="reply" />
|
||||||
Reply to thread
|
Leave comment
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<NoteCard event={reply} class="card2 bg-alt z-feature w-full">
|
<NoteCard event={reply} class="card2 bg-alt z-feature w-full">
|
||||||
<div class="col-3 ml-12">
|
<div class="col-3 ml-12">
|
||||||
<Content showEntire event={reply} />
|
<Content showEntire event={reply} />
|
||||||
<ThreadActions event={reply} {url} />
|
<CalendarEventActions event={reply} {url} />
|
||||||
</div>
|
</div>
|
||||||
</NoteCard>
|
</NoteCard>
|
||||||
{/each}
|
{/each}
|
||||||
@@ -80,14 +80,14 @@
|
|||||||
<NoteCard event={$event} class="card2 bg-alt z-feature w-full">
|
<NoteCard event={$event} class="card2 bg-alt z-feature w-full">
|
||||||
<div class="col-3 ml-12">
|
<div class="col-3 ml-12">
|
||||||
<Content showEntire event={$event} quoteProps={{relays: [url]}} />
|
<Content showEntire event={$event} quoteProps={{relays: [url]}} />
|
||||||
<ThreadActions event={$event} {url} />
|
<CalendarEventActions event={$event} {url} />
|
||||||
</div>
|
</div>
|
||||||
</NoteCard>
|
</NoteCard>
|
||||||
{:else}
|
{:else}
|
||||||
{#await sleep(5000)}
|
{#await sleep(5000)}
|
||||||
<Spinner loading>Loading thread...</Spinner>
|
<Spinner loading>Loading comments...</Spinner>
|
||||||
{:then}
|
{:then}
|
||||||
<p>Failed to load thread.</p>
|
<p>Failed to load comments.</p>
|
||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
<PageBar class="mx-0">
|
<PageBar class="mx-0">
|
||||||
@@ -110,5 +110,5 @@
|
|||||||
</PageBar>
|
</PageBar>
|
||||||
</div>
|
</div>
|
||||||
{#if showReply}
|
{#if showReply}
|
||||||
<ThreadReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import NoteCard from "@app/components/NoteCard.svelte"
|
import NoteCard from "@app/components/NoteCard.svelte"
|
||||||
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
|
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
|
||||||
import ThreadActions from "@app/components/ThreadActions.svelte"
|
import ThreadActions from "@app/components/ThreadActions.svelte"
|
||||||
import ThreadReply from "@app/components/ThreadReply.svelte"
|
import EventReply from "@app/components/EventReply.svelte"
|
||||||
import {deriveEvent, decodeRelay} from "@app/state"
|
import {deriveEvent, decodeRelay} from "@app/state"
|
||||||
import {setChecked} from "@app/notifications"
|
import {setChecked} from "@app/notifications"
|
||||||
|
|
||||||
@@ -110,5 +110,5 @@
|
|||||||
</PageBar>
|
</PageBar>
|
||||||
</div>
|
</div>
|
||||||
{#if showReply}
|
{#if showReply}
|
||||||
<ThreadReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user