mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Add support for kind 1063
This commit is contained in:
parent
4234cbc0e1
commit
41a08f7167
@ -2,6 +2,7 @@
|
|||||||
import NoteContentKind1 from "src/app/shared/NoteContentKind1.svelte"
|
import NoteContentKind1 from "src/app/shared/NoteContentKind1.svelte"
|
||||||
import NoteContentKind1985 from "src/app/shared/NoteContentKind1985.svelte"
|
import NoteContentKind1985 from "src/app/shared/NoteContentKind1985.svelte"
|
||||||
import NoteContentKind9802 from "src/app/shared/NoteContentKind9802.svelte"
|
import NoteContentKind9802 from "src/app/shared/NoteContentKind9802.svelte"
|
||||||
|
import NoteContentKind1063 from "src/app/shared/NoteContentKind1063.svelte"
|
||||||
import user from "src/agent/user"
|
import user from "src/agent/user"
|
||||||
|
|
||||||
export let note
|
export let note
|
||||||
@ -15,6 +16,8 @@
|
|||||||
<NoteContentKind1985 {note} {anchorId} {maxLength} {showEntire} />
|
<NoteContentKind1985 {note} {anchorId} {maxLength} {showEntire} />
|
||||||
{:else if note.kind === 9802}
|
{:else if note.kind === 9802}
|
||||||
<NoteContentKind9802 {note} {anchorId} {maxLength} {showEntire} {showMedia} />
|
<NoteContentKind9802 {note} {anchorId} {maxLength} {showEntire} {showMedia} />
|
||||||
|
{:else if note.kind === 1063}
|
||||||
|
<NoteContentKind1063 {note} {showMedia} />
|
||||||
{:else}
|
{:else}
|
||||||
<NoteContentKind1 {note} {anchorId} {maxLength} {showEntire} {showMedia} />
|
<NoteContentKind1 {note} {anchorId} {maxLength} {showEntire} {showMedia} />
|
||||||
{/if}
|
{/if}
|
||||||
|
13
src/app/shared/NoteContentKind1063.svelte
Normal file
13
src/app/shared/NoteContentKind1063.svelte
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import {Tags} from "src/util/nostr"
|
||||||
|
import {canDisplayUrl} from "src/util/notes"
|
||||||
|
import NoteContentLink from "src/app/shared/NoteContentLink.svelte"
|
||||||
|
|
||||||
|
export let note, showMedia
|
||||||
|
|
||||||
|
const url = Tags.from(note).getMeta("url")
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if url}
|
||||||
|
<NoteContentLink value={{url, canDisplay: canDisplayUrl(url)}} {showMedia} />
|
||||||
|
{/if}
|
@ -6,6 +6,7 @@ import {tryJson, avg} from "src/util/misc"
|
|||||||
import {invoiceAmount} from "src/util/lightning"
|
import {invoiceAmount} from "src/util/lightning"
|
||||||
|
|
||||||
export const noteKinds = [1, 1985, 30023, 30018, 10001, 1063, 9802]
|
export const noteKinds = [1, 1985, 30023, 30018, 10001, 1063, 9802]
|
||||||
|
// export const noteKinds = [1063]
|
||||||
export const personKinds = [0, 2, 3, 10001, 10002]
|
export const personKinds = [0, 2, 3, 10001, 10002]
|
||||||
export const userKinds = personKinds.concat([10000, 30001, 30078])
|
export const userKinds = personKinds.concat([10000, 30001, 30078])
|
||||||
export const appDataKeys = [
|
export const appDataKeys = [
|
||||||
|
@ -200,9 +200,3 @@ export const getLinks = parts =>
|
|||||||
"value",
|
"value",
|
||||||
parts.filter(x => x.type === LINK && x.canDisplay)
|
parts.filter(x => x.type === LINK && x.canDisplay)
|
||||||
)
|
)
|
||||||
|
|
||||||
export const isStandalone = (content, i) =>
|
|
||||||
!content[i - 1] ||
|
|
||||||
content[i - 1].type === NEWLINE ||
|
|
||||||
!content[i + 1] ||
|
|
||||||
content[i + 1].type === NEWLINE
|
|
||||||
|
Loading…
Reference in New Issue
Block a user