diff --git a/ui/noogle/src/components/ImageGeneration.vue b/ui/noogle/src/components/ImageGeneration.vue index 93793d7..0c8ff76 100644 --- a/ui/noogle/src/components/ImageGeneration.vue +++ b/ui/noogle/src/components/ImageGeneration.vue @@ -26,7 +26,7 @@ import { ref } from "vue"; import ModalComponent from "../components/Newnote.vue"; import VueDatePicker from "@vuepic/vue-datepicker"; import {timestamp} from "@vueuse/core"; -import {post_note, schedule, copyinvoice, copyurl, sleep, nextInput, get_user_infos, createBolt11Lud16} from "../components/helper/Helper.vue" +import {post_note, schedule, copyinvoice, copyurl, sleep, nextInput, get_user_infos, createBolt11Lud16, zaprequest} from "../components/helper/Helper.vue" import StringUtil from "@/components/helper/string.ts"; @@ -153,7 +153,8 @@ async function listen() { about: "", image: "", amount: 0, - bolt11: "" + bolt11: "", + nip90params: {}, } for (const tag in event.tags) { @@ -184,7 +185,9 @@ async function listen() { let lud16 = current.profile.lud16 if (lud16 !== null && lud16 !== ""){ console.log("LUD16: " + lud16) - jsonentry.bolt11 = await createBolt11Lud16(lud16, jsonentry.amount) //todo replace with zaprequest + //jsonentry.bolt11 = await createBolt11Lud16(lud16, jsonentry.amount) //todo replace with zaprequest + jsonentry.bolt11 = await zaprequest(lud16, jsonentry.amount , "zapped from noogle.lol", event.id.toHex(), event.author.toHex(), store.state.relays) //Not working yet + console.log(jsonentry.bolt11) if(jsonentry.bolt11 === ""){ status = "error" @@ -210,8 +213,8 @@ async function listen() { jsonentry.name = el.name jsonentry.about = el.about jsonentry.image = el.image + jsonentry.nip90Params = el.nip90Params - console.log(jsonentry) } } @@ -396,7 +399,12 @@ const submitHandler = async () => {

{{ dvm.name }}

-

+

+ + + diff --git a/ui/noogle/src/components/Login.vue b/ui/noogle/src/components/Login.vue index 32074c4..2cde7ef 100644 --- a/ui/noogle/src/components/Login.vue +++ b/ui/noogle/src/components/Login.vue @@ -586,6 +586,7 @@ export default { jsonentry.about = await parseandreplacenpubs(jsonentry.about) jsonentry.event = entry.asJson() jsonentry.kind = entry.tags[tag].asVec()[1] + //jsonentry.nip90Params = JSON.parse(jsonentry.nip90Params) nip89dvms.push(jsonentry); } catch (error){ diff --git a/ui/noogle/src/components/NoteTable.vue b/ui/noogle/src/components/NoteTable.vue index 2846efa..f4633b7 100644 --- a/ui/noogle/src/components/NoteTable.vue +++ b/ui/noogle/src/components/NoteTable.vue @@ -21,6 +21,7 @@

+
Client @@ -28,7 +29,7 @@ Nostrudel -
+
@@ -36,7 +37,7 @@

{{zapAmount/1000}}

-
+
@@ -82,7 +83,7 @@ const headers: Header[] = [ ]; -async function zap(lud16, eventid, authorid, author){ +async function zap(lud16, eventid, authorid){ if(lud16 != Null && lud16 != ""){ let invoice = await zaprequest(lud16, 21 , "with love from noogle.lol", eventid, authorid, store.state.relays) //Not working yet @@ -172,7 +173,7 @@ async function zap(lud16, eventid, authorid, author){ } .customize-table { width: auto; - --easy-table-border: 2px solid #000000; + --easy-table-border: 2px solid bg-base; --easy-table-row-border: 1px solid #000000; --easy-table-header-font-size: 14px; diff --git a/ui/noogle/src/components/helper/Helper.vue b/ui/noogle/src/components/helper/Helper.vue index 820ab74..7c1292a 100644 --- a/ui/noogle/src/components/helper/Helper.vue +++ b/ui/noogle/src/components/helper/Helper.vue @@ -246,10 +246,23 @@ export async function parseandreplacenpubs(note){ export async function parseandreplacenpubsName(note){ - const myArray = note.split(" "); + const myArray = note.split(/\n | \r | /); let finalnote = "" for (let word in myArray){ - if(myArray[word].startsWith("nostr:npub")){ + + if (myArray[word].startsWith("https")){ + myArray[word] = myArray[word] + "\n" + } + + if(myArray[word].startsWith("nostr:note")){ + myArray[word] = "" +myArray[word].replace("nostr:", "") + " " + } + else if(myArray[word].startsWith("nostr:nevent")){ + myArray[word] = "" +myArray[word].replace("nostr:", "") + " " + } + + + else if(myArray[word].startsWith("nostr:npub")){ //console.log(myArray[word]) //console.log(pk.toBech32()) @@ -258,7 +271,8 @@ export async function parseandreplacenpubsName(note){ let profiles = await get_user_infos([pk]) //console.log(profiles[0].profile.nip05) - myArray[word] = profiles[0].profile.name + // myArray[word] = "" + profiles[0].profile.name + " " + myArray[word] = "" + profiles[0].profile.name + " " // profiles[0].profile.name // replace with nip05 for now diff --git a/ui/noogle/src/components/helper/string.ts b/ui/noogle/src/components/helper/string.ts index af2afd4..717663a 100644 --- a/ui/noogle/src/components/helper/string.ts +++ b/ui/noogle/src/components/helper/string.ts @@ -9,9 +9,10 @@ const Regex_Nip05_Str= "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^ const StringUtil = { isValidUrl: (str: string): boolean => new RegExp(Regex_Url_Str, "i").test(str), - parseHyperlinks: (str: string): string => str.replace(new RegExp(Regex_Urlw_Str, "gim"), "$&").replace(new RegExp(Regex_Nip05_Str, "gim"), "$&"), - parseImages: (str: string): string => str.replace(new RegExp(Regex_Url_Img, "gim"), " ").replace(new RegExp(Regex_Url_Video, "gim"), "").replace(new RegExp(Regex_Url_Str, "gim"), "$&"), + parseHyperlinks: (str: string): string => str.replace(new RegExp(Regex_Urlw_Str, "gim"), "$&").replace(new RegExp(Regex_Nip05_Str, "gim"), "$& "), + parseImages: (str: string): string => str.replace(new RegExp(Regex_Url_Img, "gim"), " ").replace(new RegExp(Regex_Url_Video, "gim"), " ").replace(new RegExp(Regex_Url_Str, "gim"), "$& "), + //parseImages: (str: string): string => str.replace("\n", " ").replace(new RegExp(Regex_Url_Img, "gim"), " ") }; diff --git a/ui/noogle/src/layouts/ThreeColumnLayout.vue b/ui/noogle/src/layouts/ThreeColumnLayout.vue index 4ed1a45..c50cb9e 100644 --- a/ui/noogle/src/layouts/ThreeColumnLayout.vue +++ b/ui/noogle/src/layouts/ThreeColumnLayout.vue @@ -11,7 +11,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
- Noogle + Search Discover ImageGen