e.target === e.currentTarget && (showPreferences = false)}
- onkeydown={(e) => {
- if (e.key === 'Escape') {
- e.preventDefault();
- showPreferences = false;
- }
- }}
- role="dialog"
- aria-modal="true"
- aria-labelledby="preferences-title"
- tabindex="-1"
- >
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
{/if}
diff --git a/src/lib/components/write/CreateEventForm.svelte b/src/lib/components/write/CreateEventForm.svelte
index 33457c4..5b8226b 100644
--- a/src/lib/components/write/CreateEventForm.svelte
+++ b/src/lib/components/write/CreateEventForm.svelte
@@ -21,6 +21,7 @@
{ value: 30041, label: '30041 - AsciiDoc' },
{ value: 30040, label: '30040 - Event Index (metadata-only)' },
{ value: 1068, label: '1068 - Poll' },
+ { value: 10895, label: '10015 - RSS Feed' },
{ value: -1, label: 'Unknown Kind' }
];
@@ -45,7 +46,15 @@
}
});
+ // Clear content for metadata-only kinds
+ $effect(() => {
+ if (selectedKind === 30040 || selectedKind === 10895) {
+ content = '';
+ }
+ });
+
const isKind30040 = $derived(selectedKind === 30040);
+ const isKind10895 = $derived(selectedKind === 10895);
const isUnknownKind = $derived(selectedKind === -1);
const effectiveKind = $derived(isUnknownKind ? (parseInt(customKindId) || 1) : selectedKind);
@@ -112,6 +121,11 @@
description: 'A poll event. Content is the poll label/question. Options and settings are in tags.',
suggestedTags: ['option (optionId, label)', 'relay (one or more)', 'polltype (singlechoice|multiplechoice)', 'endsAt (unix timestamp)']
};
+ case 10895:
+ return {
+ description: 'RSS Feed subscription event. Lists external RSS feeds to subscribe to. Content should be empty.',
+ suggestedTags: ['u (RSS feed URL, repeat for multiple feeds)']
+ };
default:
return {
description: `Custom kind ${kind}. Refer to the relevant NIP specification for tag requirements.`,
@@ -321,6 +335,19 @@
id: '...',
sig: '...'
}, null, 2);
+ case 10895:
+ return JSON.stringify({
+ kind: 10895,
+ pubkey: examplePubkey,
+ created_at: timestamp,
+ content: '',
+ tags: [
+ ['u', 'https://example.com/feed.rss'],
+ ['u', 'https://another-site.com/rss.xml']
+ ],
+ id: '...',
+ sig: '...'
+ }, null, 2);
default:
return JSON.stringify({
kind: kind,
@@ -493,7 +520,7 @@
{/if}
- {#if !isKind30040}
+ {#if !isKind30040 && !isKind10895}
-
-
-
+
{#if onCancel}