diff --git a/client/src/components/Panels/Common/ToolSection.vue b/client/src/components/Panels/Common/ToolSection.vue index f3d303c881ca..ac087d2bb9ab 100644 --- a/client/src/components/Panels/Common/ToolSection.vue +++ b/client/src/components/Panels/Common/ToolSection.vue @@ -3,8 +3,7 @@ import { computed, onMounted, onUnmounted, ref, watch } from "vue"; import { eventHub } from "@/components/plugins/eventHub.js"; import { useConfig } from "@/composables/config"; -import { ToolSectionLabel } from "@/stores/toolStore"; -import { useToolStore } from "@/stores/toolStore"; +import { type ToolSectionLabel, useToolStore } from "@/stores/toolStore"; import ariaAlert from "@/utils/ariaAlert"; import Tool from "./Tool.vue"; @@ -67,9 +66,8 @@ const elems = computed(() => { if (props.category.tools !== undefined && props.category.tools.length > 0) { return props.category.tools.map((toolId: string) => { const tool = toolStore.getToolForId(toolId); - if (!tool && toolId.startsWith("panel_label_") && props.category.panel_labels) { - const labelId = toolId.split("panel_label_")[1]; - return props.category.panel_labels.find((label: ToolSectionLabel) => label.id === labelId); + if (!tool && typeof toolId !== "string") { + return toolId as ToolSectionLabel; } else { return tool; } diff --git a/client/src/components/Panels/ToolBox.vue b/client/src/components/Panels/ToolBox.vue index abc20de3135e..141932e0e5c6 100644 --- a/client/src/components/Panels/ToolBox.vue +++ b/client/src/components/Panels/ToolBox.vue @@ -76,9 +76,7 @@ const query = computed({ }); const { currentPanel } = storeToRefs(toolStore); -// const localPanelView = computed(() => (props.setDefault ? props.panelView.value : props.panelView)); const hasResults = computed(() => results.value.length > 0); -// const panelLoaded = computed(() => !!props.panelView && toolStore.panel[props.panelView] !== undefined); const queryTooShort = computed(() => query.value && query.value.length < 3); const queryFinished = computed(() => query.value && queryPending.value != true); @@ -237,7 +235,7 @@ function setButtonText() {