From ad164bbeeec935f566b183bbfb77cec38aab677d Mon Sep 17 00:00:00 2001 From: Tan Chien Hao Date: Fri, 1 Dec 2023 19:00:51 +0800 Subject: [PATCH] dont show buttons for non-owners + cannot edit if not owner, removed listview (reformatting) --- src/components/DataPanel.vue | 16 ++++++++-- src/components/DecoPanel.vue | 8 +++-- src/components/Navbar.vue | 8 +++-- src/components/ProjectList.vue | 2 ++ src/router/index.ts | 14 ++++++--- src/views/{Graph.vue => GraphLayout.vue} | 27 ++-------------- src/views/ListLayout.vue | 39 ++++++++++++++++++++++++ 7 files changed, 78 insertions(+), 36 deletions(-) rename src/views/{Graph.vue => GraphLayout.vue} (90%) create mode 100644 src/views/ListLayout.vue diff --git a/src/components/DataPanel.vue b/src/components/DataPanel.vue index 37e9d68..453b820 100644 --- a/src/components/DataPanel.vue +++ b/src/components/DataPanel.vue @@ -3,11 +3,13 @@

ID : {{ (data_panel.uid ? data_panel.uid : "Hover over a node") }}

+ @focus="pauseKeyDown" @blur="handleBlur('name', $event)" + :disabled="this.$store.state.kratos_user_id == 'guest'"/>
+ @focus="pauseKeyDown" @blur="handleBlur('link', $event)" + :disabled="this.$store.state.kratos_user_id == 'guest'"/>
@@ -19,7 +21,8 @@
+ @focus="pauseKeyDown" @blur="handleBlur('description', $event)" + :disabled="this.$store.state.kratos_user_id == 'guest'">
@@ -131,6 +134,13 @@ export default defineComponent({ setTimeout(() => { retrieval_status.value = "" }, 1000) + }).catch((err) => { + console.log(err); + retrieval_status.value = "Error!" + this.$emit('add_log', 'DataPanel', 'error') + setTimeout(() => { + retrieval_status.value = "" + }, 1000) }); }, onInputPropertyName: function () { }, diff --git a/src/components/DecoPanel.vue b/src/components/DecoPanel.vue index 04fb043..d183170 100644 --- a/src/components/DecoPanel.vue +++ b/src/components/DecoPanel.vue @@ -40,7 +40,8 @@ Tag Name: + autocomplete="on" list="autocomplete_tags" + :disabled="this.$store.state.kratos_user_id == 'guest'"/>