mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Add possibility for open / closed trades view
This commit is contained in:
parent
b85241e7c2
commit
5651978902
|
@ -48,10 +48,14 @@ const routes: Array<RouteConfig> = [
|
|||
component: () => import(/* webpackChunkName: "balance" */ '@/components/ftbot/Balance.vue'),
|
||||
},
|
||||
{
|
||||
path: '/trades',
|
||||
name: 'Freqtrade trade',
|
||||
path: '/open_trades',
|
||||
component: () => import(/* webpackChunkName: "balance" */ '@/views/TradesList.vue'),
|
||||
},
|
||||
{
|
||||
path: '/trade_history',
|
||||
component: () => import(/* webpackChunkName: "balance" */ '@/views/TradesList.vue'),
|
||||
props: { history: true },
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
name: 'Freqtrade Settings',
|
||||
|
|
|
@ -8,7 +8,14 @@
|
|||
empty-text="Currently no open trades."
|
||||
/> -->
|
||||
<CustomTradeList
|
||||
class="trade-history"
|
||||
v-if="!history"
|
||||
:trades="openTrades"
|
||||
title="Open trades"
|
||||
:active-trades="true"
|
||||
empty-text="No open Trades."
|
||||
/>
|
||||
<CustomTradeList
|
||||
v-if="history"
|
||||
:trades="closedTrades"
|
||||
title="Trade history"
|
||||
empty-text="No closed trades so far."
|
||||
|
@ -17,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
import CustomTradeList from '@/components/ftbot/CustomTradeList.vue';
|
||||
|
||||
|
@ -33,6 +40,8 @@ const ftbot = namespace(StoreModules.ftbot);
|
|||
},
|
||||
})
|
||||
export default class Trading extends Vue {
|
||||
@Prop({ default: false }) history!: boolean;
|
||||
|
||||
@ftbot.Getter [BotStoreGetters.openTrades]!: Trade[];
|
||||
|
||||
@ftbot.Getter [BotStoreGetters.closedTrades]!: Trade[];
|
||||
|
|
Loading…
Reference in New Issue
Block a user