mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
lint/format
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-12 row-2">
|
||||
<div class="row-2 ml-12">
|
||||
{#if !isThread}
|
||||
<ReplySummary {event} />
|
||||
{/if}
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-12 row-2">
|
||||
<div class="row-2 ml-12">
|
||||
<ReplySummary {event} />
|
||||
<ReactionSummary {event} {onReactionClick} />
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
// If we found this event on a relay that the user is a member of, redirect internally
|
||||
$: url = getMembershipUrls($userMembership).find(url => $trackerStore.hasRelay($event?.id, url))
|
||||
$: root = $event?.kind === REPLY ? $event.tags.find(nthEq(0, 'E'))?.[1] : $event?.id
|
||||
$: root = $event?.kind === REPLY ? $event.tags.find(nthEq(0, "E"))?.[1] : $event?.id
|
||||
$: href = url && root ? makeThreadPath(url, root) : entityLink(entity)
|
||||
</script>
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
|
||||
const reactions = deriveEvents(repository, {filters: [{kinds: [REACTION], "#e": [event.id]}]})
|
||||
|
||||
$: groupedReactions = groupBy(e => e.content, uniqBy(e => e.pubkey + e.content, $reactions))
|
||||
$: groupedReactions = groupBy(
|
||||
e => e.content,
|
||||
uniqBy(e => e.pubkey + e.content, $reactions),
|
||||
)
|
||||
</script>
|
||||
|
||||
{#each groupedReactions.entries() as [content, events]}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {groupBy, uniqBy} from "@welshman/lib"
|
||||
import {REACTION} from "@welshman/util"
|
||||
import {deriveEvents} from "@welshman/store"
|
||||
import {pubkey, repository} from "@welshman/app"
|
||||
import {repository} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import {REPLY} from "@app/state"
|
||||
|
||||
|
||||
@@ -42,17 +42,17 @@
|
||||
$: lastActive = max([...$replies, event].map(e => e.created_at))
|
||||
</script>
|
||||
|
||||
<div class="flex items-center justify-between flex-wrap gap-2">
|
||||
<div class="flex flex-wrap items-center justify-between gap-2">
|
||||
<div class="flex gap-2">
|
||||
<ReactionSummary {event} {onReactionClick} />
|
||||
</div>
|
||||
<div class="flex gap-2 flex-grow justify-end">
|
||||
<div class="flex flex-grow justify-end gap-2">
|
||||
{#if showActivity}
|
||||
<div class="flex-inline btn btn-neutral btn-xs gap-1 rounded-full">
|
||||
<Icon icon="reply" />
|
||||
<span>{$replies.length} {$replies.length === 1 ? "reply" : "replies"}</span>
|
||||
</div>
|
||||
<div class="btn btn-neutral btn-xs rounded-full hidden sm:flex">
|
||||
<div class="btn btn-neutral btn-xs hidden rounded-full sm:flex">
|
||||
Active {formatTimestampRelative(lastActive)}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -63,7 +63,7 @@
|
||||
component={ThreadMenu}
|
||||
props={{url, event, onClick: hidePopover}}
|
||||
params={{trigger: "manual", interactive: true}}>
|
||||
<Button class="btn btn-neutral btn-xs join-item" on:click={showPopover}>
|
||||
<Button class="btn join-item btn-neutral btn-xs" on:click={showPopover}>
|
||||
<Icon icon="menu-dots" size={4} />
|
||||
</Button>
|
||||
</Tippy>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<script lang="ts">
|
||||
import {formatTimestamp, formatTimestampRelative} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import {formatTimestamp} from "@welshman/app"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Content from "@app/components/Content.svelte"
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import ThreadActions from "@app/components/ThreadActions.svelte"
|
||||
import {makeThreadPath} from "@app/routes"
|
||||
import {REPLY} from "@app/state"
|
||||
|
||||
export let url
|
||||
export let event
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script lang="ts">
|
||||
import {nip19} from "nostr-tools"
|
||||
import {goto} from '$app/navigation'
|
||||
import {ctx} from '@welshman/lib'
|
||||
import {goto} from "$app/navigation"
|
||||
import {ctx} from "@welshman/lib"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
@@ -18,8 +17,7 @@
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onSubmit = () =>
|
||||
goto(makeRoomPath(url, selection) + '?content=nostr:' + nevent)
|
||||
const onSubmit = () => goto(makeRoomPath(url, selection) + "?content=nostr:" + nevent)
|
||||
|
||||
const toggleRoom = (room: string) => {
|
||||
selection = room === selection ? "" : room
|
||||
|
||||
@@ -13,8 +13,7 @@ export const makeSpacePath = (url: string, extra = "") => {
|
||||
|
||||
export const makeChatPath = (pubkeys: string[]) => `/chat/${makeChatId(pubkeys)}`
|
||||
|
||||
export const makeRoomPath = (url: string, room: string) =>
|
||||
`/spaces/${encodeRelay(url)}/${room}`
|
||||
export const makeRoomPath = (url: string, room: string) => `/spaces/${encodeRelay(url)}/${room}`
|
||||
|
||||
export const makeThreadPath = (url: string, eventId: string) =>
|
||||
`/spaces/${encodeRelay(url)}/threads/${eventId}`
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
|
||||
Reference in New Issue
Block a user