mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 21:31:52 +01:00
noogle fixes
This commit is contained in:
parent
702a151451
commit
7527aef14d
@ -9,7 +9,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rust-nostr/nostr-sdk": "^0.7.0",
|
||||
"@rust-nostr/nostr-sdk": "^0.8.0",
|
||||
"mini-toastr": "^0.8.1",
|
||||
"vue": "^3.3.11",
|
||||
"vue-notifications": "^1.0.2",
|
||||
|
@ -9,7 +9,6 @@ import ResultsTable from "@/components/ResultTable.vue";
|
||||
|
||||
<main>
|
||||
|
||||
<img alt="Nostr logo" class="logo" src="./assets/nostr-purple.svg" width="125" height="125" />
|
||||
<Search/>
|
||||
<br>
|
||||
<ResultsTable></ResultsTable>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div class="playeauthor-wrapper" v-if="current_user">
|
||||
<img class="avatar" :src="this.avatar" alt="" />
|
||||
<p>Current User is: {{ this.current_user }}</p>
|
||||
<p>{{ this.current_user }}</p>
|
||||
</div>
|
||||
<template v-if="current_user">
|
||||
<button class="b-Button" @click="sign_out()">Sign out</button>
|
||||
@ -59,6 +59,7 @@ export default {
|
||||
let nip07_signer = new Nip07Signer();
|
||||
try{
|
||||
this.signer = ClientSigner.nip07(nip07_signer);
|
||||
console.log("SIGNER: " + this.signer)
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
@ -75,23 +76,23 @@ export default {
|
||||
await client.addRelay("wss://nos.lol");
|
||||
await client.addRelay("wss://relay.f7z.io")
|
||||
await client.addRelay("wss://pablof7z.nostr1.com")
|
||||
//await client.addRelay("wss://relay.nostr.net")
|
||||
//await client.addRelay("wss://relay.nostr.band");
|
||||
//await client.addRelay("wss://nostr-pub.wellorder.net")
|
||||
await client.addRelay("wss://relay.nostr.net")
|
||||
await client.addRelay("wss://relay.nostr.band");
|
||||
await client.addRelay("wss://nostr-pub.wellorder.net")
|
||||
|
||||
const pubkey = await nip07_signer.getPublicKey();
|
||||
await client.connect();
|
||||
|
||||
|
||||
/*
|
||||
const filter = new Filter().kind(6302).limit(20)
|
||||
//TODO this next line breaks the code
|
||||
//await client.reconcile(filter);
|
||||
/*const filterl = new Filter().author(pubkey)
|
||||
let test = dbclient.database().query([filterl])
|
||||
await client.reconcile(filter);
|
||||
const filterl = new Filter().author(pubkey)
|
||||
let test = await client.database.query([filterl])
|
||||
for (let ev of test){
|
||||
console.log(ev.as_json())
|
||||
}
|
||||
*/
|
||||
console.log(ev.asJson())
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
store.commit('set_client', client)
|
||||
|
@ -21,7 +21,7 @@ async function send_search_request(message) {
|
||||
tags.push(Tag.parse(["param", "max_results", "100"]))
|
||||
let evt = new EventBuilder(5302, "Search for me", tags)
|
||||
let res = await client.sendEventBuilder(evt)
|
||||
miniToastr.showMessage("Sent Request to DVMs", "Awaiting results", VueNotifications.types.info)
|
||||
miniToastr.showMessage("Sent Request to DVMs", "Awaiting results", VueNotifications.types.warn)
|
||||
if (!listener){
|
||||
listen()
|
||||
}
|
||||
@ -97,18 +97,14 @@ async function listen() {
|
||||
|
||||
|
||||
for (const evt of events){
|
||||
console.log(evt.id.toHex())
|
||||
let p = profiles.find( record => record.author === evt.author.toHex())
|
||||
console.log(p)
|
||||
let bech32id = evt.id.toBech32()
|
||||
let picture = p["profile"]["picture"]
|
||||
let picture = p === undefined ? "../assets/nostr-purple.svg" : p["profile"]["picture"]
|
||||
let name = p === undefined ? bech32id : p["profile"]["name"]
|
||||
let highlighterurl = "https://highlighter.com/a/" + bech32id
|
||||
let njumpurl = "https://njump.me/" + bech32id
|
||||
let nostrudelurl = "https://nostrudel.ninja/#/n/" + evt.id.toBech32()
|
||||
|
||||
|
||||
|
||||
items.push({ content: evt.content, author: p["profile"]["name"], authorurl: "https://njump.me/" + evt.author.toBech32(), links: {"highlighter": highlighterurl, "njump": njumpurl, "nostrudel": nostrudelurl} , avatar: picture, indicator: {"time": evt.createdAt.toHumanDatetime()}})
|
||||
items.push({ content: evt.content, author: name, authorurl: "https://njump.me/" + evt.author.toBech32(), links: {"highlighter": highlighterurl, "njump": njumpurl, "nostrudel": nostrudelurl} , avatar: picture, indicator: {"time": evt.createdAt.toHumanDatetime()}})
|
||||
|
||||
|
||||
|
||||
@ -141,8 +137,14 @@ defineProps({
|
||||
<template>
|
||||
|
||||
<div class="greetings">
|
||||
<h1 class="purple">Noogle</h1>
|
||||
<img alt="Nostr logo" class="logo" src="../assets/nostr-purple.svg" width="125" height="125" />
|
||||
|
||||
<h1 class="purple">Noogle</h1>
|
||||
<h2>Nostr Search based on Data Vending Machines</h2>
|
||||
|
||||
<h3>
|
||||
<br>
|
||||
<br>
|
||||
<div>
|
||||
<button class="c-Button" @click="send_search_request(message)">Search the Nostr
|
||||
</button> <input class="c-Input" v-model="message" >
|
||||
@ -180,6 +182,9 @@ h1 {
|
||||
position: relative;
|
||||
top: -10px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.0rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.2rem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user