Add title to Trade navigator

This commit is contained in:
Matthias 2022-08-02 20:36:47 +02:00
parent 7a781b33d7
commit 0dab6fa60f
2 changed files with 27 additions and 24 deletions

View File

@ -1,27 +1,30 @@
<template>
<b-list-group>
<b-list-group-item
v-for="trade in sortedTrades"
:key="trade.open_timestamp"
button
class="d-flex justify-content-between align-items-center py-1"
:title="`${trade.pair}`"
:active="trade.open_timestamp === selectedTrade.open_timestamp"
@click="onTradeSelect(trade)"
>
<div>
<DateTimeTZ :date="trade.open_timestamp" />
</div>
<div>
<span>Trade Navigation</span>
<b-list-group>
<b-list-group-item
v-for="trade in sortedTrades"
:key="trade.open_timestamp"
button
class="d-flex justify-content-between align-items-center py-1"
:title="`${trade.pair}`"
:active="trade.open_timestamp === selectedTrade.open_timestamp"
@click="onTradeSelect(trade)"
>
<div>
<DateTimeTZ :date="trade.open_timestamp" />
</div>
<TradeProfit :trade="trade" />
<ProfitPill
v-if="backtestMode"
:profit-ratio="trade.profit_ratio"
:stake-currency="botStore.activeBot.stakeCurrency"
/>
</b-list-group-item>
<b-list-group-item v-if="trades.length === 0">No trades to show...</b-list-group-item>
</b-list-group>
<TradeProfit :trade="trade" />
<ProfitPill
v-if="backtestMode"
:profit-ratio="trade.profit_ratio"
:stake-currency="botStore.activeBot.stakeCurrency"
/>
</b-list-group-item>
<b-list-group-item v-if="trades.length === 0">No trades to show...</b-list-group-item>
</b-list-group>
</div>
</template>
<script lang="ts">

View File

@ -282,8 +282,8 @@
<div class="col-md-1 text-right">
<b-button
v-if="btFormMode === 'visualize'"
class="right-bar-toggle"
aria-label="Close"
title="Trade Navigation"
size="sm"
@click="showRightBar = !showRightBar"
>{{ showRightBar ? '&gt;' : '&lt;' }}
@ -401,7 +401,7 @@ export default defineComponent({
const startingCapital = ref('');
const btFormMode = ref('run');
const pollInterval = ref<number | null>(null);
const sliderPosition = ref({} as ChartSliderPosition);
const sliderPosition = ref<ChartSliderPosition>();
const setBacktestResult = (key: string) => {
botStore.activeBot.setBacktestResultKey(key);