Fix some bottom padding stuff
This commit is contained in:
@@ -280,7 +280,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</PageBar>
|
</PageBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col-reverse gap-2 py-4">
|
<PageContent class="flex flex-col-reverse gap-2 py-2 !mb-0">
|
||||||
{#if missingRelayLists.length > 0}
|
{#if missingRelayLists.length > 0}
|
||||||
<div class="py-12">
|
<div class="py-12">
|
||||||
<div class="card2 col-2 m-auto max-w-md items-center text-center">
|
<div class="card2 col-2 m-auto max-w-md items-center text-center">
|
||||||
|
|||||||
@@ -45,20 +45,11 @@
|
|||||||
event: TrustedEvent
|
event: TrustedEvent
|
||||||
replyTo?: (event: TrustedEvent) => void
|
replyTo?: (event: TrustedEvent) => void
|
||||||
showPubkey?: boolean
|
showPubkey?: boolean
|
||||||
addSpaceBelow?: boolean
|
|
||||||
canEdit: (event: TrustedEvent) => boolean
|
canEdit: (event: TrustedEvent) => boolean
|
||||||
onEdit: (event: TrustedEvent) => void
|
onEdit: (event: TrustedEvent) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {url, event, replyTo = undefined, showPubkey = false, canEdit, onEdit}: Props = $props()
|
||||||
url,
|
|
||||||
event,
|
|
||||||
replyTo = undefined,
|
|
||||||
showPubkey = false,
|
|
||||||
addSpaceBelow = false,
|
|
||||||
canEdit,
|
|
||||||
onEdit,
|
|
||||||
}: Props = $props()
|
|
||||||
|
|
||||||
const path = getRoomItemPath(url, event)
|
const path = getRoomItemPath(url, event)
|
||||||
const shouldProtect = canEnforceNip70(url)
|
const shouldProtect = canEnforceNip70(url)
|
||||||
@@ -95,7 +86,7 @@
|
|||||||
{onTap}
|
{onTap}
|
||||||
class={cx(
|
class={cx(
|
||||||
"group relative flex w-full cursor-default flex-col px-2 py-0.5 text-left hover:bg-base-100/50",
|
"group relative flex w-full cursor-default flex-col px-2 py-0.5 text-left hover:bg-base-100/50",
|
||||||
{"mt-1.5": showPubkey, "mb-1.5": addSpaceBelow},
|
{"mt-1.5": showPubkey},
|
||||||
)}>
|
)}>
|
||||||
<div class="flex w-full gap-3 overflow-auto">
|
<div class="flex w-full gap-3 overflow-auto">
|
||||||
{#if showPubkey}
|
{#if showPubkey}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
const className = $derived(
|
const className = $derived(
|
||||||
cx(
|
cx(
|
||||||
props.class,
|
props.class,
|
||||||
"scroll-container z-feature flex min-h-0 w-full min-w-0 flex-col overflow-y-auto overflow-x-hidden pb-14 md:pb-0",
|
"scroll-container z-feature flex flex-col min-h-0 w-full min-w-0 overflow-y-auto overflow-x-hidden mb-14 md:mb-0",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -254,7 +254,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</PageBar>
|
</PageBar>
|
||||||
<PageContent class="flex flex-col gap-2 p-2 pt-4">
|
<PageContent class="flex flex-col gap-2 p-2">
|
||||||
<div class="flex flex-col gap-2" bind:this={element}>
|
<div class="flex flex-col gap-2" bind:this={element}>
|
||||||
{#each PLATFORM_RELAYS as url (url)}
|
{#each PLATFORM_RELAYS as url (url)}
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -350,16 +350,11 @@
|
|||||||
event.created_at - previousCreatedAt > int(3, MINUTE) ||
|
event.created_at - previousCreatedAt > int(3, MINUTE) ||
|
||||||
previousKind === ROOM_ADD_MEMBER
|
previousKind === ROOM_ADD_MEMBER
|
||||||
|
|
||||||
if (showPubkey && elements.length > 0) {
|
|
||||||
elements[elements.length - 1].addSpaceBelow = true
|
|
||||||
}
|
|
||||||
|
|
||||||
elements.push({
|
elements.push({
|
||||||
id: event.id,
|
id: event.id,
|
||||||
type: "note",
|
type: "note",
|
||||||
value: event,
|
value: event,
|
||||||
showPubkey,
|
showPubkey,
|
||||||
addSpaceBelow: false,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
previousDate = date
|
previousDate = date
|
||||||
@@ -368,9 +363,6 @@
|
|||||||
previousCreatedAt = event.created_at
|
previousCreatedAt = event.created_at
|
||||||
seen.add(event.id)
|
seen.add(event.id)
|
||||||
}
|
}
|
||||||
if (elements.length > 0) {
|
|
||||||
elements[elements.length - 1].addSpaceBelow = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.reverse()
|
elements.reverse()
|
||||||
@@ -470,7 +462,7 @@
|
|||||||
bind:element
|
bind:element
|
||||||
onscroll={onScroll}
|
onscroll={onScroll}
|
||||||
class={cx(
|
class={cx(
|
||||||
"flex-col-reverse pb-0! pt-4",
|
"flex-col-reverse !mb-0",
|
||||||
showMobileVideoPanel ? "hidden md:flex md:flex-col-reverse" : "flex",
|
showMobileVideoPanel ? "hidden md:flex md:flex-col-reverse" : "flex",
|
||||||
pageContentHiddenDesktopVideoOnly && "md:hidden",
|
pageContentHiddenDesktopVideoOnly && "md:hidden",
|
||||||
)}>
|
)}>
|
||||||
@@ -501,7 +493,7 @@
|
|||||||
<Spinner loading={loadingForward}>Looking for messages...</Spinner>
|
<Spinner loading={loadingForward}>Looking for messages...</Spinner>
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#each elements as { type, id, value, showPubkey, addSpaceBelow }, i (id)}
|
{#each elements as { type, id, value, showPubkey }, i (id)}
|
||||||
{#if type === "new-messages"}
|
{#if type === "new-messages"}
|
||||||
<div
|
<div
|
||||||
{id}
|
{id}
|
||||||
@@ -523,7 +515,6 @@
|
|||||||
{event}
|
{event}
|
||||||
{replyTo}
|
{replyTo}
|
||||||
{showPubkey}
|
{showPubkey}
|
||||||
{addSpaceBelow}
|
|
||||||
canEdit={canEditEvent}
|
canEdit={canEditEvent}
|
||||||
onEdit={onEditEvent} />
|
onEdit={onEditEvent} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent bind:element class="flex flex-col gap-2 p-2 pt-4">
|
<PageContent bind:element class="flex flex-col gap-2 p-2">
|
||||||
{#each items as { event, dateDisplay, isFirstFutureEvent }, i (event.id)}
|
{#each items as { event, dateDisplay, isFirstFutureEvent }, i (event.id)}
|
||||||
<div class={"calendar-event-" + event.id}>
|
<div class={"calendar-event-" + event.id}>
|
||||||
{#if isFirstFutureEvent}
|
{#if isFirstFutureEvent}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col gap-3 p-2 pt-4">
|
<PageContent class="flex flex-col gap-3 p-2">
|
||||||
{#if $event}
|
{#if $event}
|
||||||
<div class="card2 bg-alt col-3 z-feature">
|
<div class="card2 bg-alt col-3 z-feature">
|
||||||
<div class="flex items-start gap-4">
|
<div class="flex items-start gap-4">
|
||||||
@@ -109,10 +109,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
{#await sleep(5000)}
|
<div class="flex justify-center py-20">
|
||||||
<Spinner loading>Loading comments...</Spinner>
|
{#await sleep(5000)}
|
||||||
{:then}
|
<Spinner loading>Loading event...</Spinner>
|
||||||
<p>Failed to load comments.</p>
|
{:then}
|
||||||
{/await}
|
<p>Failed to load event.</p>
|
||||||
|
{/await}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
|||||||
@@ -227,16 +227,11 @@
|
|||||||
event.created_at - previousCreatedAt > int(3, MINUTE) ||
|
event.created_at - previousCreatedAt > int(3, MINUTE) ||
|
||||||
previousKind === RELAY_ADD_MEMBER
|
previousKind === RELAY_ADD_MEMBER
|
||||||
|
|
||||||
if (showPubkey && elements.length > 0) {
|
|
||||||
elements[elements.length - 1].addSpaceBelow = true
|
|
||||||
}
|
|
||||||
|
|
||||||
elements.push({
|
elements.push({
|
||||||
id: event.id,
|
id: event.id,
|
||||||
type: "note",
|
type: "note",
|
||||||
value: event,
|
value: event,
|
||||||
showPubkey,
|
showPubkey,
|
||||||
addSpaceBelow: false,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
previousDate = date
|
previousDate = date
|
||||||
@@ -245,9 +240,6 @@
|
|||||||
previousCreatedAt = event.created_at
|
previousCreatedAt = event.created_at
|
||||||
seen.add(event.id)
|
seen.add(event.id)
|
||||||
}
|
}
|
||||||
if (elements.length > 0) {
|
|
||||||
elements[elements.length - 1].addSpaceBelow = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.reverse()
|
elements.reverse()
|
||||||
@@ -318,13 +310,13 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent bind:element onscroll={onScroll} class="flex flex-col-reverse pt-4 pb-0!">
|
<PageContent bind:element onscroll={onScroll} class="flex-col-reverse !mb-0">
|
||||||
{#if loadingForward}
|
{#if loadingForward}
|
||||||
<p class="py-20 flex justify-center">
|
<p class="py-20 flex justify-center">
|
||||||
<Spinner loading={loadingForward}>Looking for messages...</Spinner>
|
<Spinner loading={loadingForward}>Looking for messages...</Spinner>
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#each elements as { type, id, value, showPubkey, addSpaceBelow }, i (id)}
|
{#each elements as { type, id, value, showPubkey }, i (id)}
|
||||||
{#if type === "new-messages"}
|
{#if type === "new-messages"}
|
||||||
<div
|
<div
|
||||||
{id}
|
{id}
|
||||||
@@ -347,8 +339,7 @@
|
|||||||
{replyTo}
|
{replyTo}
|
||||||
{showPubkey}
|
{showPubkey}
|
||||||
canEdit={canEditEvent}
|
canEdit={canEditEvent}
|
||||||
onEdit={onEditEvent}
|
onEdit={onEditEvent} />
|
||||||
{addSpaceBelow} />
|
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent bind:element class="flex flex-col gap-2 p-2 pt-4">
|
<PageContent bind:element class="flex flex-col gap-2 p-2">
|
||||||
{#each items as event (event.id)}
|
{#each items as event (event.id)}
|
||||||
<div in:fly>
|
<div in:fly>
|
||||||
<ClassifiedItem {url} event={$state.snapshot(event)} />
|
<ClassifiedItem {url} event={$state.snapshot(event)} />
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col p-2 pt-4">
|
<PageContent class="flex flex-col gap-2 p-2">
|
||||||
{#if $event}
|
{#if $event}
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
{#if showReply}
|
{#if showReply}
|
||||||
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-end p-2">
|
<div class="flex justify-end">
|
||||||
<Button class="btn btn-primary" onclick={openReply}>
|
<Button class="btn btn-primary" onclick={openReply}>
|
||||||
<Icon icon={Reply} />
|
<Icon icon={Reply} />
|
||||||
Reply to listing
|
Reply to listing
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<div class="py-20 m-auto">
|
<div class="flex justify-center py-20">
|
||||||
{#await sleep(5000)}
|
{#await sleep(5000)}
|
||||||
<Spinner loading>Loading listing...</Spinner>
|
<Spinner loading>Loading listing...</Spinner>
|
||||||
{:then}
|
{:then}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent bind:element class="flex flex-col gap-2 p-2 pt-4">
|
<PageContent bind:element class="flex flex-col gap-2 p-2">
|
||||||
{#each items as event (event.id)}
|
{#each items as event (event.id)}
|
||||||
<div in:fly>
|
<div in:fly>
|
||||||
<GoalItem {url} event={$state.snapshot(event)} />
|
<GoalItem {url} event={$state.snapshot(event)} />
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col p-2 pt-4">
|
<PageContent class="flex flex-col gap-2 p-2">
|
||||||
{#if $event}
|
{#if $event}
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
{#if showReply}
|
{#if showReply}
|
||||||
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-end p-2">
|
<div class="flex justify-end">
|
||||||
<Button class="btn btn-primary" onclick={openReply}>
|
<Button class="btn btn-primary" onclick={openReply}>
|
||||||
<Icon icon={Reply} />
|
<Icon icon={Reply} />
|
||||||
Comment on this goal
|
Comment on this goal
|
||||||
@@ -99,10 +99,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
{#await sleep(5000)}
|
<div class="flex justify-center py-20">
|
||||||
<Spinner loading>Loading funding goal...</Spinner>
|
{#await sleep(5000)}
|
||||||
{:then}
|
<Spinner loading>Loading funding goal...</Spinner>
|
||||||
<p>Failed to load funding goal.</p>
|
{:then}
|
||||||
{/await}
|
<p>Failed to load funding goal.</p>
|
||||||
|
{/await}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent bind:element class="flex flex-col gap-2 p-2 pt-4">
|
<PageContent bind:element class="flex flex-col gap-2 p-2">
|
||||||
{#each items as event (event.id)}
|
{#each items as event (event.id)}
|
||||||
<div in:fly>
|
<div in:fly>
|
||||||
<PollItem {url} event={$state.snapshot(event)} />
|
<PollItem {url} event={$state.snapshot(event)} />
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col gap-3 p-2 pt-4">
|
<PageContent class="flex flex-col gap-2 p-2">
|
||||||
{#if $event}
|
{#if $event}
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
||||||
@@ -92,15 +92,17 @@
|
|||||||
{#if showReply}
|
{#if showReply}
|
||||||
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-end p-2">
|
<div class="flex justify-end">
|
||||||
<Button class="btn btn-primary" onclick={openReply}>Comment on this poll</Button>
|
<Button class="btn btn-primary" onclick={openReply}>Comment on this poll</Button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
{#await sleep(5000)}
|
<div class="flex justify-center py-20">
|
||||||
<Spinner loading>Loading poll...</Spinner>
|
{#await sleep(5000)}
|
||||||
{:then}
|
<Spinner loading>Loading poll...</Spinner>
|
||||||
<p>Failed to load poll.</p>
|
{:then}
|
||||||
{/await}
|
<p>Failed to load poll.</p>
|
||||||
|
{/await}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col gap-2 p-2 pt-4" bind:element>
|
<PageContent class="flex flex-col gap-2 p-2" bind:element>
|
||||||
{#if $recentActivity.length === 0}
|
{#if $recentActivity.length === 0}
|
||||||
<p class="flex flex-col items-center py-20 text-center">No recent activity found!</p>
|
<p class="flex flex-col items-center py-20 text-center">No recent activity found!</p>
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent bind:element class="flex flex-col gap-2 p-2 pt-4">
|
<PageContent bind:element class="flex flex-col gap-2 p-2">
|
||||||
{#each items as event (event.id)}
|
{#each items as event (event.id)}
|
||||||
<div in:fly>
|
<div in:fly>
|
||||||
<ThreadItem {url} event={$state.snapshot(event)} />
|
<ThreadItem {url} event={$state.snapshot(event)} />
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<PageContent class="flex flex-col p-2 pt-4">
|
<PageContent class="flex flex-col gap-2 p-2">
|
||||||
{#if $event}
|
{#if $event}
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
<NoteCard event={$event} {url} class="card2 bg-alt z-feature w-full">
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
{#if showReply}
|
{#if showReply}
|
||||||
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
<EventReply {url} event={$event} onClose={closeReply} onSubmit={closeReply} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-end p-2">
|
<div class="flex justify-end">
|
||||||
<Button class="btn btn-primary" onclick={openReply}>
|
<Button class="btn btn-primary" onclick={openReply}>
|
||||||
<Icon icon={Reply} />
|
<Icon icon={Reply} />
|
||||||
Reply to thread
|
Reply to thread
|
||||||
@@ -98,10 +98,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
{#await sleep(5000)}
|
<div class="flex justify-center py-20">
|
||||||
<Spinner loading>Loading thread...</Spinner>
|
{#await sleep(5000)}
|
||||||
{:then}
|
<Spinner loading>Loading thread...</Spinner>
|
||||||
<p>Failed to load thread.</p>
|
{:then}
|
||||||
{/await}
|
<p>Failed to load thread.</p>
|
||||||
|
{/await}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Page>
|
<Page>
|
||||||
<PageContent class="flex flex-col items-center gap-2 p-2 pt-4">
|
<PageContent class="flex flex-col items-center gap-2 p-2">
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
{#snippet title()}
|
{#snippet title()}
|
||||||
<div>Choose your Hosting Plan</div>
|
<div>Choose your Hosting Plan</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user