From 97e3290a310b4775082f8f2861378ded68d33e16 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 31 May 2023 20:42:32 +0200 Subject: [PATCH] Add "expanding" chevron to highlight that there's more parameters --- src/components/ftbot/PairlistConfigItem.vue | 27 +++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/components/ftbot/PairlistConfigItem.vue b/src/components/ftbot/PairlistConfigItem.vue index 78afc5e6..cbe6affc 100644 --- a/src/components/ftbot/PairlistConfigItem.vue +++ b/src/components/ftbot/PairlistConfigItem.vue @@ -7,13 +7,27 @@
{{ pairlist.name }} {{ pairlist.description }}
- + + + @@ -37,6 +51,7 @@ import { Pairlist } from '@/types'; import { ref } from 'vue'; import PairlistConfigParameter from './PairlistConfigParameter.vue'; +import { computed } from 'vue'; defineProps<{ index: number; @@ -47,6 +62,14 @@ const emit = defineEmits(['remove']); const visible = ref(false); const pairlist = defineModel({ required: true }); + +const hasParameters = computed(() => Object.keys(pairlist.value.params).length > 0); + +function toggleVisible() { + if (hasParameters.value) { + visible.value = !visible.value; + } +}