From e42521de823a05f135d37ec0d5763780f43f9865 Mon Sep 17 00:00:00 2001 From: Tan Chien Hao Date: Fri, 1 Dec 2023 19:47:38 +0800 Subject: [PATCH] working list view READ + append to existing description instead of replacing --- src/components/DataPanel.vue | 6 +-- src/components/Navbar.vue | 12 +++++- src/router/index.ts | 4 +- src/store/index.ts | 6 ++- src/views/GraphLayout.vue | 1 + src/views/ListLayout.vue | 74 ++++++++++++++++++++++++++++++++++-- 6 files changed, 91 insertions(+), 12 deletions(-) diff --git a/src/components/DataPanel.vue b/src/components/DataPanel.vue index 453b820..ea7688e 100644 --- a/src/components/DataPanel.vue +++ b/src/components/DataPanel.vue @@ -96,17 +96,17 @@ export default defineComponent({ `${import.meta.env.VITE_AUTOFILL_URL}` + `/?url=${new_value}`; var name = "", link = "", - description = ""; + description = this.$props.data_panel.description; try { retrieval_status.value = "Retrieving website info..." const response = await axios.get(autofill_request_url); name = response.data.title; link = response.data.url; - description = response.data.summary; + description += response.data.summary; } catch (err) { name = `${new_value}`; link = new_value; - description = `description for ${new_value}`; + description += `\n\ndescription for ${new_value}`; } const nameLengthLimit = 100; name = diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 5032172..336390d 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -3,9 +3,17 @@