From dd18c1eef5aee205487ca9a31eb0dc835ed2f805 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 20 May 2024 14:28:26 -0500 Subject: [PATCH 1/3] Move activity panel go to button to top --- .../ActivityBar/ActivitySettings.vue | 20 ++++------ .../src/components/Panels/ActivityPanel.vue | 38 +++++++++++++------ .../components/Panels/InvocationsPanel.vue | 8 +++- .../src/components/Panels/MultiviewPanel.vue | 23 ++++------- .../src/components/Panels/SettingsPanel.vue | 16 +++++++- .../components/Panels/VisualizationPanel.vue | 6 ++- 6 files changed, 66 insertions(+), 45 deletions(-) diff --git a/client/src/components/ActivityBar/ActivitySettings.vue b/client/src/components/ActivityBar/ActivitySettings.vue index 16c596e531f4..d210fab4df26 100644 --- a/client/src/components/ActivityBar/ActivitySettings.vue +++ b/client/src/components/ActivityBar/ActivitySettings.vue @@ -4,12 +4,10 @@ import { faSquare } from "@fortawesome/free-regular-svg-icons"; import { faCheckSquare, faThumbtack, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { storeToRefs } from "pinia"; -import { computed, type ComputedRef, type Ref, ref } from "vue"; +import { computed, type ComputedRef } from "vue"; import { type Activity, useActivityStore } from "@/stores/activityStore"; -import DelayedInput from "@/components/Common/DelayedInput.vue"; - library.add({ faCheckSquare, faSquare, @@ -17,13 +15,16 @@ library.add({ faThumbtack, }); +const props = defineProps<{ + query: string; +}>(); + const activityStore = useActivityStore(); const { activities } = storeToRefs(activityStore); -const query: Ref = ref(""); const filteredActivities = computed(() => { - if (query.value.length > 0) { - const queryLower = query.value.toLowerCase(); + if (props.query.length > 0) { + const queryLower = props.query.toLowerCase(); const results = activities.value.filter((a: Activity) => { const attributeValues = [a.title, a.description]; for (const value of attributeValues) { @@ -52,16 +53,11 @@ function onClick(activity: Activity) { function onRemove(activity: Activity) { activityStore.remove(activity.id); } - -function onQuery(newQuery: string) { - query.value = newQuery; -}