From a0936483475cdd1849bb278b78fcf65d04cc1d2e Mon Sep 17 00:00:00 2001 From: Believethehype Date: Wed, 6 Mar 2024 14:12:36 +0100 Subject: [PATCH] optimizations --- ui/noogle/src/components/ImageGeneration.vue | 18 ++++++---- ui/noogle/src/components/Login.vue | 1 - ui/noogle/src/components/Newnote.vue | 7 ++-- .../components/RecommendationGeneration.vue | 36 ++++++++++--------- ui/noogle/src/components/Search.vue | 9 ++--- .../components/SummarizationGeneration.vue | 32 +++++++++-------- ui/noogle/src/layouts/ThreeColumnLayout.vue | 2 +- ui/noogle/src/router/index.js | 2 +- ui/noogle/src/store.js | 6 ++-- 9 files changed, 61 insertions(+), 52 deletions(-) diff --git a/ui/noogle/src/components/ImageGeneration.vue b/ui/noogle/src/components/ImageGeneration.vue index 10ad486..80059a5 100644 --- a/ui/noogle/src/components/ImageGeneration.vue +++ b/ui/noogle/src/components/ImageGeneration.vue @@ -93,8 +93,9 @@ async function generate_image(message) { store.commit('set_current_request_id_image', requestid) if (!store.state.imagehasEventListener){ - listen() store.commit('set_imagehasEventListener', true) + listen() + } else{ console.log("Already has event listener") @@ -115,14 +116,14 @@ async function listen() { const handle = { // Handle event handleEvent: async (relayUrl, event) => { - if (store.state.imagehasEventListener === false){ + /* if (store.state.imagehasEventListener === false){ return true - } + }*/ //const dvmname = getNamefromId(event.author.toHex()) console.log("Received new event from", relayUrl); console.log(event.asJson()) let resonsetorequest = false - sleep(1000).then(async () => { + sleep(0).then(async () => { for (let tag in event.tags) { if (event.tags[tag].asVec()[0] === "e") { //console.log("IMAGE ETAG: " + event.tags[tag].asVec()[1]) @@ -360,10 +361,13 @@ const submitHandler = async () => { diff --git a/ui/noogle/src/components/Newnote.vue b/ui/noogle/src/components/Newnote.vue index 63577e8..8a6321d 100644 --- a/ui/noogle/src/components/Newnote.vue +++ b/ui/noogle/src/components/Newnote.vue @@ -18,7 +18,6 @@ onClickOutside(target, ()=>emit('modal-close'))