diff --git a/src/lib/components/EventMenu.svelte b/src/lib/components/EventMenu.svelte index 4a8e265..3b7acde 100644 --- a/src/lib/components/EventMenu.svelte +++ b/src/lib/components/EventMenu.svelte @@ -276,10 +276,11 @@ function cloneEvent() { // Store event data in sessionStorage for the write page to pick up + // Ensure content is preserved (important for kind 0 which has stringified JSON) const cloneData = { kind: event.kind, - content: event.content, - tags: event.tags, + content: event.content || '', // Explicitly preserve content, even if empty string + tags: event.tags || [], isClone: true }; sessionStorage.setItem('aitherboard_cloneEvent', JSON.stringify(cloneData)); diff --git a/src/lib/components/modals/EventJsonModal.svelte b/src/lib/components/modals/EventJsonModal.svelte index ca2895c..2672df9 100644 --- a/src/lib/components/modals/EventJsonModal.svelte +++ b/src/lib/components/modals/EventJsonModal.svelte @@ -12,7 +12,6 @@ let { open = $bindable(false), event = $bindable(null) }: Props = $props(); let jsonText = $derived(event ? JSON.stringify(event, null, 2) : ''); let copied = $state(false); - let wordWrap = $state(true); // Default to word-wrap enabled let jsonPreviewRef: HTMLElement | null = $state(null); // Highlight JSON when it changes @@ -73,16 +72,6 @@
{jsonText}
+ {jsonText}
Repository not found.
+ {getRepoDescription()} +
+ {/if}- {getRepoDescription()} -
- {/if} +