Why Nostr? What is Njump?
2024-05-24 09:34:26
in reply to

DanConwayDev on Nostr: patch kind with multi line commit message: ...

patch kind with multi line commit message:
From cc10e6ef37ad2a951fa09e10a97e4c075d21a725 Mon Sep 17 00:00:00 2001
From: DanConwayDev
Date: Tue, 23 Apr 2024 11:49:33 +0100
Subject: [PATCH] feat: add lite event wrapper for reactions, etc

for reactions, reposts and adding 30001 lists

primarily added so that reposts are not a wall of json
---
src/lib/components/events/EventWrapperLite.svelte | 23 +++++++++++++++++++++++
src/lib/wrappers/EventCard.svelte | 49 +++++++++++++++++++++++++++++++++++--------------
2 files changed, 58 insertions(+), 14 deletions(-)
create mode 100644 src/lib/components/events/EventWrapperLite.svelte

diff --git a/src/lib/components/events/EventWrapperLite.svelte b/src/lib/components/events/EventWrapperLite.svelte
new file mode 100644
index 0000000..33b9622
--- /dev/null
+++ b/src/lib/components/events/EventWrapperLite.svelte
@@ -0,0 +1,23 @@
+
+
+

+

+

+

+

+
+

+

+ {created_at_ago}
+

+

diff --git a/src/lib/wrappers/EventCard.svelte b/src/lib/wrappers/EventCard.svelte
index 612d6f5..a0279bc 100644
--- a/src/lib/wrappers/EventCard.svelte
+++ b/src/lib/wrappers/EventCard.svelte
@@ -1,5 +1,6 @@


-
- {#if event.kind == patch_kind}
- {#if isCoverLetter(event.content)}
- - content={extractPatchMessage(event.content)}
- tags={event.tags}
- />
+{#if event.kind && event.kind === 6}
+
+ reposted by
+

+{:else if event.kind && event.kind === 30001}
+
+ added to '{getDtag(event) || 'unknown'}' list by
+

+{:else if event.kind && event.kind === 7}
+
+ {event.content}
+

+{:else}
+
+ {#if event.kind == patch_kind}
+ {#if isCoverLetter(event.content)}
+ + content={extractPatchMessage(event.content)}
+ tags={event.tags}
+ />
+ {:else}
+
+ {/if}
+ {:else if event.kind && proposal_status_kinds.includes(event.kind)}
+
{:else}
-
+
{/if}
- {:else if event.kind && proposal_status_kinds.includes(event.kind)}
-
- {:else}
-
- {/if}
-

+

+{/if}
--
libgit2 1.7.2

Author Public Key
npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr