mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-10 12:49:29 +02:00
requested changes.
This commit is contained in:
parent
2a4554fe74
commit
a67aad1223
@ -1,5 +1,6 @@
|
||||
import { Modal, ModalOverlay, ModalContent, ModalBody, ModalCloseButton, Flex } from "@chakra-ui/react";
|
||||
import { ModalProps } from "@chakra-ui/react";
|
||||
import { nip19 } from "nostr-tools";
|
||||
|
||||
import { NostrEvent, isATag } from "../../types/nostr-event";
|
||||
import RawJson from "./raw-json";
|
||||
@ -27,7 +28,8 @@ export default function CommunityPostDebugModal({
|
||||
<ModalBody p="4">
|
||||
<Flex gap="2" direction="column">
|
||||
<RawValue heading="Event Id" value={event.id} />
|
||||
<RawValue heading="Pointer (NIP-19)" value={getSharableEventAddress(event)} />
|
||||
<RawValue heading="NIP-19 Encoded Id" value={nip19.noteEncode(event.id)} />
|
||||
<RawValue heading="NIP-19 Pointer" value={getSharableEventAddress(event)} />
|
||||
<RawValue heading="Community Coordinate" value={communityCoordinate} />
|
||||
<RawPre heading="Content" value={event.content} />
|
||||
<RawJson heading="JSON" json={event} />
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Modal, ModalOverlay, ModalContent, ModalBody, ModalCloseButton, Flex } from "@chakra-ui/react";
|
||||
import { ModalProps } from "@chakra-ui/react";
|
||||
import { nip19 } from "nostr-tools";
|
||||
|
||||
import { getReferences } from "../../helpers/nostr/events";
|
||||
import { NostrEvent } from "../../types/nostr-event";
|
||||
@ -17,7 +18,8 @@ export default function NoteDebugModal({ event, ...props }: { event: NostrEvent
|
||||
<ModalBody p="4">
|
||||
<Flex gap="2" direction="column">
|
||||
<RawValue heading="Event Id" value={event.id} />
|
||||
<RawValue heading="Pointer (NIP-19)" value={getSharableEventAddress(event)} />
|
||||
<RawValue heading="NIP-19 Encoded Id" value={nip19.noteEncode(event.id)} />
|
||||
<RawValue heading="NIP-19 Pointer" value={getSharableEventAddress(event)} />
|
||||
<RawPre heading="Content" value={event.content} />
|
||||
<RawJson heading="JSON" json={event} />
|
||||
<RawJson heading="References" json={getReferences(event)} />
|
||||
|
@ -55,7 +55,10 @@ export default function CommunityPostMenu({
|
||||
<MenuItem onClick={() => window.navigator.clipboard.writeText("nostr:" + address)} icon={<RepostIcon />}>
|
||||
Copy Share Link
|
||||
</MenuItem>
|
||||
<MenuItem onClick={() => window.navigator.clipboard.writeText(event.id)} icon={<CopyToClipboardIcon />}>
|
||||
<MenuItem
|
||||
onClick={() => window.navigator.clipboard.writeText(nip19.noteEncode(event.id))}
|
||||
icon={<CopyToClipboardIcon />}
|
||||
>
|
||||
Copy Note ID
|
||||
</MenuItem>
|
||||
{account?.pubkey === event.pubkey && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user