Use welshman/app

This commit is contained in:
Jon Staab
2024-08-30 16:25:41 -07:00
parent 05e35c9f26
commit 618049c4af
26 changed files with 127 additions and 904 deletions
+11 -6
View File
@@ -8,6 +8,13 @@
import type {TrustedEvent} from "@welshman/util"
import {deriveEvents} from "@welshman/store"
import {PublishStatus} from "@welshman/net"
import {
publishStatusData,
deriveProfile,
deriveProfileDisplay,
formatTimestampAsTime,
} from "@welshman/app"
import type {PublishStatusData} from "@welshman/app"
import {
GROUP_REPLY,
REACTION,
@@ -15,14 +22,12 @@
displayRelayUrl,
getAncestorTags,
} from "@welshman/util"
import {repository} from "@welshman/app"
import {fly} from "@lib/transition"
import {formatTimestampAsTime} from "@lib/util"
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import Avatar from "@lib/components/Avatar.svelte"
import {repository} from "@app/base"
import type {PublishStatusData} from "@app/state"
import {deriveProfile, deriveProfileDisplay, deriveEvent, publishStatusData} from "@app/state"
import {deriveEvent} from "@app/state"
import {getChatViewOptions} from "@app/editor"
export let event: TrustedEvent
@@ -73,8 +78,8 @@
let editor: Readable<Editor>
$: parentPubkey = $parentEvent?.pubkey || replies[0]?.[4]
$: parentProfile = deriveProfile(parentPubkey)
$: parentProfileDisplay = deriveProfileDisplay(parentPubkey)
$: parentProfile = deriveProfile(parentPubkey || "")
$: parentProfileDisplay = deriveProfileDisplay(parentPubkey || "")
$: isPublished = findStatus($ps, [PublishStatus.Success])
$: isPending = findStatus($ps, [PublishStatus.Pending]) && event.created_at > now() - 30
$: failure =