From b08962bbb33837b0f1488630cd7ce8fbc6ee9694 Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:21:36 +0100 Subject: [PATCH] update discovery few --- ... => discovery_trending_notes_nostrband.py} | 3 +- ui/noogle/src/components/Login.vue | 5 + ui/noogle/src/components/Nip89view.vue | 17 +- .../components/RecommendationGeneration.vue | 155 ++++- .../RecommendationGeneration_old.vue | 585 ++++++++++++++++++ 5 files changed, 753 insertions(+), 12 deletions(-) rename nostr_dvm/tasks/{trending_notes_nostrband.py => discovery_trending_notes_nostrband.py} (96%) create mode 100644 ui/noogle/src/components/RecommendationGeneration_old.vue diff --git a/nostr_dvm/tasks/trending_notes_nostrband.py b/nostr_dvm/tasks/discovery_trending_notes_nostrband.py similarity index 96% rename from nostr_dvm/tasks/trending_notes_nostrband.py rename to nostr_dvm/tasks/discovery_trending_notes_nostrband.py index 4659b83..6ada615 100644 --- a/nostr_dvm/tasks/trending_notes_nostrband.py +++ b/nostr_dvm/tasks/discovery_trending_notes_nostrband.py @@ -102,8 +102,9 @@ def build_example(name, identifier, admin_config): nip89info = { "name": name, - "image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg", + "image": "https://image.nostr.build/4dc758923c7bfc5ba92030e6419272ec7470c3809d36e88e99f3a9daece88bac.png", "about": "I show trending notes from nostr.band", + "amount": "Free", "encryptionSupported": True, "cashuAccepted": True, "nip90Params": {} diff --git a/ui/noogle/src/components/Login.vue b/ui/noogle/src/components/Login.vue index 3d1c547..32074c4 100644 --- a/ui/noogle/src/components/Login.vue +++ b/ui/noogle/src/components/Login.vue @@ -567,6 +567,7 @@ export default { //let evts = await client.database.query([filterl]) let evts = await client.getEventsOf([filter], Duration.fromSecs(5)) for (const entry of evts){ + for (const tag in entry.tags){ if (entry.tags[tag].asVec()[0] === "k") if(entry.tags[tag].asVec()[1] >= 5000 && entry.tags[tag].asVec()[1] <= 5999 && deadnip89s.filter(i => i.id === entry.id.toHex() ).length === 0) { // blocklist.indexOf(entry.id.toHex()) < 0){ @@ -578,6 +579,10 @@ export default { jsonentry.image = jsonentry.picture } + if(!jsonentry.amount){ + jsonentry.amount = "" + } + jsonentry.id = entry.author.toHex() jsonentry.about = await parseandreplacenpubs(jsonentry.about) jsonentry.event = entry.asJson() jsonentry.kind = entry.tags[tag].asVec()[1] diff --git a/ui/noogle/src/components/Nip89view.vue b/ui/noogle/src/components/Nip89view.vue index 30bd46d..87bf90b 100644 --- a/ui/noogle/src/components/Nip89view.vue +++ b/ui/noogle/src/components/Nip89view.vue @@ -1,20 +1,35 @@