From 13ff8966716f1ac9790289a2b6cbec433bb4e3ab Mon Sep 17 00:00:00 2001 From: Tako Date: Fri, 14 Jul 2023 16:59:43 +0000 Subject: [PATCH] ability to see orders in trade navigation --- src/components/ftbot/TradeListNav.vue | 51 ++++++++++++++++++++------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/src/components/ftbot/TradeListNav.vue b/src/components/ftbot/TradeListNav.vue index 6f8eda89..9f8f7ede 100644 --- a/src/components/ftbot/TradeListNav.vue +++ b/src/components/ftbot/TradeListNav.vue @@ -9,7 +9,7 @@ >Trade Navigation {{ sortNewestFirst ? '↓' : '↑' }} -
- {{ - trade.is_short ? 'S-' : 'L-' - }} - +
+
+ {{ + trade.is_short ? 'S-' : 'L-' + }} + +
+ +
- - + + + + +
    +
  • + {{ order.ft_order_side }} {{ order.amount }} at {{ order.safe_price }} +
  • +
+
No trades to show... @@ -39,7 +55,7 @@ import { Trade } from '@/types'; import TradeProfit from '@/components/ftbot/TradeProfit.vue'; import ProfitPill from '@/components/general/ProfitPill.vue'; -import { computed, ref } from 'vue'; +import { computed, ref, watch } from 'vue'; import { useBotStore } from '@/stores/ftbotwrapper'; import DateTimeTZ from '@/components/general/DateTimeTZ.vue'; @@ -67,6 +83,15 @@ const sortedTrades = computed(() => { : a.open_timestamp - b.open_timestamp, ); }); + +const ordersVisible = ref(sortedTrades.value.map(() => false)); + +watch( + () => botStore.activeBot.selectedPair, + () => { + ordersVisible.value = sortedTrades.value.map(() => false); + }, +);