From b9d316e6d65a95cd68f0dc4fb94401b2783ca5ee Mon Sep 17 00:00:00 2001 From: Davide Rovai Date: Thu, 29 Aug 2024 12:12:51 +0200 Subject: [PATCH 1/3] feat: adding explicit loaders --- components/Dialog/EditMetadata.vue | 15 +++------------ components/Element/ChatbotFiles.vue | 14 ++++++++------ components/Element/ChatbotLinks.vue | 11 +++++++---- components/Element/ChatbotQuestions.vue | 11 +++++++---- components/Element/Loader.vue | 17 +++++++++++++++++ pages/chatbot/history-[id].vue | 21 +++------------------ pages/index.vue | 21 ++++++++++++++------- 7 files changed, 59 insertions(+), 51 deletions(-) create mode 100644 components/Element/Loader.vue diff --git a/components/Dialog/EditMetadata.vue b/components/Dialog/EditMetadata.vue index ddd196a..1c3c911 100644 --- a/components/Dialog/EditMetadata.vue +++ b/components/Dialog/EditMetadata.vue @@ -59,16 +59,7 @@ @@ -101,10 +92,10 @@ onBeforeMount(async () => { const data = await response.json(); docsFound.value = (data?.length || 0) > 0; metadata.value = data?.[0]?.cmetadata || {}; - loaded.value = true; + setTimeout(() => loaded.value = true, 250); } catch (err) { console.log(err); - loaded.value = true; + setTimeout(() => loaded.value = true, 250); } }); diff --git a/components/Element/ChatbotFiles.vue b/components/Element/ChatbotFiles.vue index 53791bc..a9ba56a 100644 --- a/components/Element/ChatbotFiles.vue +++ b/components/Element/ChatbotFiles.vue @@ -1,5 +1,9 @@