-
Since
-
+
+
+
+ Search
+
+
+
+
+ {#if modal === "maxi"}
+
-
-
Until
-
+ {#if !hide.includes("authors")}
+
+ {/if}
+ {#if !hide.includes("#t")}
+
+ {/if}
+ {#if !hide.includes("#p")}
+
+ {/if}
+
-
- {#if !hide.includes('authors')}
-
{/if}
- {#if !hide.includes('#t')}
-
- {/if}
- {#if !hide.includes('#p')}
-
- {/if}
-
- {/if}
-
-
+
+
{/if}
diff --git a/src/app/shared/NoteContent.svelte b/src/app/shared/NoteContent.svelte
index 335752d5..86cd5b42 100644
--- a/src/app/shared/NoteContent.svelte
+++ b/src/app/shared/NoteContent.svelte
@@ -6,6 +6,7 @@
import {displayPerson, parseContent, getLabelQuality, displayRelay, Tags} from "src/util/nostr"
import {modal} from "src/partials/state"
import MediaSet from "src/partials/MediaSet.svelte"
+ import QRCode from "src/partials/QRCode.svelte"
import Card from "src/partials/Card.svelte"
import Spinner from "src/partials/Spinner.svelte"
import Anchor from "src/partials/Anchor.svelte"
@@ -29,15 +30,22 @@
let rating = note.kind === 1985 ? getLabelQuality("review/relay", note) : null
const links = []
+ const invoices = []
const ranges = []
// Find links and preceding whitespace
for (let i = 0; i < content.length; i++) {
const {type, value} = content[i]
- if (type === "link" && !value.startsWith("ws")) {
+ if (type === "link") {
links.push(value)
+ }
+ if (type === "lnurl") {
+ invoices.push(value)
+ }
+
+ if (["link", "lnurl"].includes(type) && !value.startsWith("ws")) {
const prev = content[i - 1]
const next = content[i + 1]
@@ -197,6 +205,11 @@
{" "}
{/each}
+ {#if invoices.length > 0}
+
+
+
+ {/if}
{#if showMedia && links.length > 0}
diff --git a/src/partials/QRCode.svelte b/src/partials/QRCode.svelte
index 4b5fce96..a3164aec 100644
--- a/src/partials/QRCode.svelte
+++ b/src/partials/QRCode.svelte
@@ -1,4 +1,5 @@
-
-
-
-
-
-
+ class={cx("rounded-xl border border-solid border-gray-6 bg-gray-8 p-4", {
+ "m-auto max-w-sm": !fullWidth,
+ })}>
+
+
+
+
+ {#if onClick === "navigate"}
+
+
+
+ {/if}
+
diff --git a/src/partials/Textarea.svelte b/src/partials/Textarea.svelte
index 85a99464..495eb9b2 100644
--- a/src/partials/Textarea.svelte
+++ b/src/partials/Textarea.svelte
@@ -8,7 +8,7 @@
const className = cx(
$$props.class,
- "rounded shadow-inset py-2 px-4 pr-10 w-full bg-input text-black",
+ "rounded-xl shadow-inset py-2 px-4 pr-10 w-full bg-input text-black",
"placeholder:text-gray-5 border border-solid border-gray-3"
)
diff --git a/src/util/nostr.ts b/src/util/nostr.ts
index 7c1d82bf..be7dc226 100644
--- a/src/util/nostr.ts
+++ b/src/util/nostr.ts
@@ -265,6 +265,14 @@ export const parseContent = ({content, tags = []}) => {
}
}
+ const parseLNUrl = () => {
+ const lnurl = first(text.match(/^lnbc[\d\w]+/i))
+
+ if (lnurl) {
+ return ["lnurl", lnurl, lnurl]
+ }
+ }
+
const parseUrl = () => {
const raw = first(text.match(/^([a-z\+:]{2,30}:\/\/)?[^\s]+\.[a-z]{2,6}[^\s]*[^\.!?,:\s]/gi))
@@ -292,7 +300,13 @@ export const parseContent = ({content, tags = []}) => {
}
while (text) {
- const part = parseNewline() || parseMention() || parseTopic() || parseBech32() || parseUrl()
+ const part =
+ parseNewline() ||
+ parseMention() ||
+ parseTopic() ||
+ parseBech32() ||
+ parseUrl() ||
+ parseLNUrl()
if (part) {
if (buffer) {