Fix lnurl parsing

This commit is contained in:
Jonathan Staab 2023-06-14 08:16:27 -07:00
parent 509e316ee6
commit fc2713e316
4 changed files with 9 additions and 7 deletions

View File

@ -56,7 +56,7 @@
} }
</script> </script>
<div class="flex justify-end gap-2 p-2"> <div class="flex justify-end gap-3 p-2">
<i <i
class="fa fa-search cursor-pointer" class="fa fa-search cursor-pointer"
on:click={() => { on:click={() => {
@ -70,7 +70,7 @@
<Content size="lg"> <Content size="lg">
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<strong>Search</strong> <strong>Search</strong>
<Input bind:value={_filter.search} on:input={applyFilter}> <Input autofocus bind:value={_filter.search} on:input={applyFilter}>
<i slot="before" class="fa fa-search" /> <i slot="before" class="fa fa-search" />
</Input> </Input>
</div> </div>

View File

@ -33,14 +33,14 @@
</script> </script>
<div <div
class="absolute left-0 h-64 w-full -mt-2" class="absolute left-0 -mt-2 h-64 w-full"
style="background-size: cover; style="background-size: cover;
background-image: background-image:
linear-gradient(to bottom, {rgba}, {rgb}), linear-gradient(to bottom, {rgba}, {rgb}),
url('{$person.kind0?.banner}')" /> url('{$person.kind0?.banner}')" />
<Content> <Content>
<div class="flex gap-4 text-gray-1 z-10"> <div class="z-10 flex gap-4 text-gray-1">
<PersonCircle person={$person} size={16} class="sm:h-32 sm:w-32" /> <PersonCircle person={$person} size={16} class="sm:h-32 sm:w-32" />
<div class="flex flex-grow flex-col gap-4"> <div class="flex flex-grow flex-col gap-4">
<div class="flex items-start justify-between gap-4"> <div class="flex items-start justify-between gap-4">
@ -65,5 +65,7 @@
<PersonStats person={$person} /> <PersonStats person={$person} />
</div> </div>
</div> </div>
<PersonNotes invertColors {pubkey} {relays} /> <div class="relative z-10">
<PersonNotes invertColors {pubkey} {relays} />
</div>
</Content> </Content>

View File

@ -60,7 +60,7 @@
class="pointer-events-auto mt-12 min-h-full transition transition-all duration-500" class="pointer-events-auto mt-12 min-h-full transition transition-all duration-500"
style={mini ? "margin-top: 55vh" : ""}> style={mini ? "margin-top: 55vh" : ""}>
{#if onEscape} {#if onEscape}
<div class="pointer-events-none sticky top-0 z-10 flex w-full flex-col items-end gap-2 p-2"> <div class="pointer-events-none sticky top-0 z-20 flex w-full flex-col items-end gap-2 p-2">
<div <div
class="pointer-events-auto flex h-10 w-10 cursor-pointer items-center justify-center rounded-full class="pointer-events-auto flex h-10 w-10 cursor-pointer items-center justify-center rounded-full
border border-solid border-accent-light bg-accent text-white transition-colors hover:bg-accent-light"> border border-solid border-accent-light bg-accent text-white transition-colors hover:bg-accent-light">

View File

@ -266,7 +266,7 @@ export const parseContent = ({content, tags = []}) => {
} }
const parseLNUrl = () => { const parseLNUrl = () => {
const lnurl = first(text.match(/^lnbc[\d\w]+/i)) const lnurl = first(text.match(/^ln(bc|url)[\d\w]{50,1000}/i))
if (lnurl) { if (lnurl) {
return ["lnurl", lnurl, lnurl] return ["lnurl", lnurl, lnurl]