From 8465208bbf02ab10944f463626e0c05ab9b9c738 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 4 Sep 2021 10:35:44 +0200 Subject: [PATCH] Add TradeProfit pill component --- src/components/ftbot/PairSummary.vue | 7 ++-- src/components/ftbot/ProfitSymbol.vue | 1 + src/components/ftbot/TradeList.vue | 9 ++--- src/components/ftbot/TradeProfit.vue | 47 +++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 src/components/ftbot/TradeProfit.vue diff --git a/src/components/ftbot/PairSummary.vue b/src/components/ftbot/PairSummary.vue index 2fbb67e5..8a67da9e 100644 --- a/src/components/ftbot/PairSummary.vue +++ b/src/components/ftbot/PairSummary.vue @@ -14,9 +14,7 @@ {{ comb.pair }} 🔒 - {{ - comb.profit ? formatPercent(comb.profit) : '' - }} + @@ -27,6 +25,7 @@ import { BotStoreGetters } from '@/store/modules/ftbot'; import { Lock, Trade } from '@/types'; import { Component, Prop, Vue } from 'vue-property-decorator'; import { namespace } from 'vuex-class'; +import TradeProfit from '@/components/ftbot/TradeProfit.vue'; const ftbot = namespace('ftbot'); @@ -39,7 +38,7 @@ interface CombinedPairList { profit: number; } -@Component({}) +@Component({ components: { TradeProfit } }) export default class PairSummary extends Vue { @Prop({ required: true }) pairlist!: string[]; diff --git a/src/components/ftbot/ProfitSymbol.vue b/src/components/ftbot/ProfitSymbol.vue index f774d817..52de4817 100644 --- a/src/components/ftbot/ProfitSymbol.vue +++ b/src/components/ftbot/ProfitSymbol.vue @@ -5,6 +5,7 @@ + +