diff --git a/ui/noogle/src/components/Home.vue b/ui/noogle/src/components/Home.vue index 9a21737..4046ece 100644 --- a/ui/noogle/src/components/Home.vue +++ b/ui/noogle/src/components/Home.vue @@ -1,12 +1,11 @@ diff --git a/ui/noogle/src/components/Login.vue b/ui/noogle/src/components/Login.vue index 4058de6..0602c3c 100644 --- a/ui/noogle/src/components/Login.vue +++ b/ui/noogle/src/components/Login.vue @@ -86,7 +86,6 @@ import { } from "@rust-nostr/nostr-sdk"; import VueNotifications from "vue-notifications"; import store from '../store'; -import Nip89 from "@/components/Nip89.vue"; import miniToastr from "mini-toastr"; import deadnip89s from "@/components/data/deadnip89s.json"; import amberSignerService from "./android-signer/AndroidSigner"; @@ -154,7 +153,7 @@ export default { await this.sign_in_anon() } - await this.getnip89s() + } catch (error) { console.log(error); } @@ -213,6 +212,7 @@ export default { localStorage.setItem('nostr-key', '') console.log("Client Nip46 connected") await this.get_user_info(pubkey) + await this.getnip89s() await this.reconcile_all_profiles(pubkey) console.log(pubkey.toBech32()) //await this.reconcile_all_profiles() @@ -223,8 +223,6 @@ export default { console.log(error); } }, - - async sign_in_anon() { try { await loadWasmAsync(); @@ -274,7 +272,7 @@ export default { console.log(error); } }, - async sign_in_key(nsec = "") { + async sign_in_key(nsec = "") { try { await loadWasmAsync(); if(logger){ @@ -330,8 +328,9 @@ export default { localStorage.setItem('nostr-key-method', "nsec") localStorage.setItem('nostr-key', keys.secretKey.toBech32()) console.log("Client key connected") - await this.get_user_info(pubkey) - await this.reconcile_all_profiles(pubkey) + await this.get_user_info(pubkey) + await this.getnip89s() + await this.reconcile_all_profiles(pubkey) } catch (error) { @@ -396,6 +395,7 @@ export default { localStorage.setItem('nostr-key', pubkey.toHex()) console.log("Client Nip07 connected") await this.get_user_info(pubkey) + await this.getnip89s() await this.reconcile_all_profiles(pubkey) //await this.reconcile_all_profiles() //miniToastr.showMessage("Login successful!", "Logged in as " + this.current_user, VueNotifications.types.success) @@ -404,7 +404,6 @@ export default { console.log(error); } }, - async sign_in_nip46() { try { @@ -465,6 +464,8 @@ export default { console.log("Client connected") await this.get_user_info(pubkey) + await this.getnip89s() + await this.reconcile_all_profiles(pubkey) //miniToastr.showMessage("Login successful!", "Logged in as " + this.current_user, VueNotifications.types.success) @@ -523,6 +524,8 @@ export default { localStorage.setItem('nostr-key', hexKey) await this.get_user_info(publicKey) + await this.getnip89s() + await this.reconcile_all_profiles(publicKey) } catch (error){ @@ -539,7 +542,6 @@ export default { //let keys = Keys.generate() let keys = Keys.parse("ece3c0aa759c3e895ecb3c13ab3813c0f98430c6d4bd22160b9c2219efc9cf0e") - let signer = NostrSigner.keys(keys) //TODO store keys let client = new ClientBuilder().signer(signer).build() for (const relay of store.state.relays){ @@ -586,8 +588,7 @@ export default { }, - -async reconcile_all_profiles(publicKey) { + async reconcile_all_profiles(publicKey) { { let dbclient = Client let keys = Keys.parse("ece3c0aa759c3e895ecb3c13ab3813c0f98430c6d4bd22160b9c2219efc9cf0e") @@ -623,7 +624,6 @@ async reconcile_all_profiles(publicKey) { } }, - async get_user_info(pubkey){ let client = store.state.client const profile_filter = new Filter().kind(0).author(pubkey).limit(1) @@ -651,7 +651,6 @@ async reconcile_all_profiles(publicKey) { } }, - async sign_out(){ this.current_user = "" if(localStorage.getItem('nostr-key-method') === "nostr-login"){ diff --git a/ui/noogle/src/components/Nip89.vue b/ui/noogle/src/components/Nip89.vue deleted file mode 100644 index 6040a5a..0000000 --- a/ui/noogle/src/components/Nip89.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - - \ No newline at end of file diff --git a/ui/noogle/src/components/NoteTable.vue b/ui/noogle/src/components/NoteTable.vue new file mode 100644 index 0000000..a9712f3 --- /dev/null +++ b/ui/noogle/src/components/NoteTable.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file diff --git a/ui/noogle/src/components/Recommendation.vue b/ui/noogle/src/components/Recommendation.vue new file mode 100644 index 0000000..8325d33 --- /dev/null +++ b/ui/noogle/src/components/Recommendation.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/ui/noogle/src/components/RecommendationGeneration.vue b/ui/noogle/src/components/RecommendationGeneration.vue new file mode 100644 index 0000000..f2e633e --- /dev/null +++ b/ui/noogle/src/components/RecommendationGeneration.vue @@ -0,0 +1,713 @@ + + + + + + + diff --git a/ui/noogle/src/layouts/ThreeColumnLayout.vue b/ui/noogle/src/layouts/ThreeColumnLayout.vue index d865b35..e863752 100644 --- a/ui/noogle/src/layouts/ThreeColumnLayout.vue +++ b/ui/noogle/src/layouts/ThreeColumnLayout.vue @@ -12,6 +12,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
Noogle + Recommendations ImageGen About DVMs diff --git a/ui/noogle/src/router/index.js b/ui/noogle/src/router/index.js index 8a5d465..87c6ff6 100644 --- a/ui/noogle/src/router/index.js +++ b/ui/noogle/src/router/index.js @@ -8,6 +8,7 @@ const routes = [ { path: "/donate", component: () => import("@/components/Donate.vue") }, { path: "/nip89", component: () => import("@/components/Nip89view.vue") }, { path: "/image", component: () => import("@/components/Image.vue") }, + { path: "/recommendation", component: () => import("@/components/Recommendation.vue") }, { path: "/article/:id", component: () => import("@/components/Home.vue") }, { path: '/:pathMatch(.*)*', component: () => import("@/components/Home.vue") }, ]; diff --git a/ui/noogle/src/store.js b/ui/noogle/src/store.js index 24bfc1d..beea4c8 100644 --- a/ui/noogle/src/store.js +++ b/ui/noogle/src/store.js @@ -13,11 +13,14 @@ const store = createStore({ requestidSearch: String, requestidSearchProfile: String, requestidImage: String, + requestidRecommendation: String, hasEventListener: false, imagehasEventListener: false, + recommendationehasEventListener: false, imagedvmreplies: [], nip89dvms: [], activesearchdvms: [], + recommendationhdvms: [], results: [], profile_results: [], relays: [ @@ -52,6 +55,11 @@ const store = createStore({ set_imagehasEventListener(state, imagehasEventListener) { state.imagehasEventListener = imagehasEventListener }, + + set_recommendationEventListener(state, recommendationehasEventListener) { + state.recommendationehasEventListener = recommendationehasEventListener + }, + set_nip89dvms(state, nip89dvms) { state.nip89dvms.length = 0 //console.log(nip89dvms) @@ -71,6 +79,10 @@ const store = createStore({ state.activesearchdvms.length = 0 state.activesearchdvms.push.apply(state.activesearchdvms, dvms) }, + set_recommendation_dvms(state, dvms) { + state.recommendationhdvms.length = 0 + state.recommendationhdvms.push.apply(state.recommendationhdvms, dvms) + }, set_search_results_profiles(state, items){ state.profile_results.length = 0 state.profile_results.push.apply(state.profile_results, items) @@ -78,6 +90,10 @@ const store = createStore({ set_current_request_id_image(state, requestid){ state.requestidImage = requestid }, + set_current_request_id_recommendation(state, requestid){ + state.requestidRecommendation = requestid + }, + set_search_results(state, results){ state.results.length = 0 state.results.push.apply(state.results, results) @@ -85,7 +101,7 @@ const store = createStore({ set_imagedvm_results(state, results){ state.imagedvmreplies.length = 0 state.imagedvmreplies.push.apply(state.imagedvmreplies, results) - } + }, } })