Move scrolbar into card

This commit is contained in:
Matthias 2020-05-08 07:14:55 +02:00
parent f87a2d6bd3
commit bfbdb3ff3e
3 changed files with 33 additions and 32 deletions

View File

@ -1,34 +1,36 @@
<template>
<div class="card">
<div class="card-header">{{ title }}</div>
<table v-if="trades" class="table table-sm table-hover">
<thead>
<tr>
<th>id</th>
<th>Pair</th>
<th>Amount</th>
<th>Stake amount</th>
<th>Open rate</th>
<th>{{ activeTrades ? 'Current rate' : 'Close rate' }}</th>
<th>{{ activeTrades ? 'Current Profit' : 'Profit' }}</th>
<th>Open date</th>
<th>Close date</th>
</tr>
</thead>
<tbody>
<tr v-for="(trade, index) in trades" :key="index">
<td>{{ trade.trade_id }}</td>
<td>{{ trade.pair }}</td>
<td>{{ trade.amount }}</td>
<td>{{ trade.stake_amount }}</td>
<td>{{ trade.open_rate }}</td>
<td>{{ activeTrades ? trade.current_rate : trade.close_rate }}</td>
<td>{{ activeTrades ? trade.current_profit : trade.close_profit.toFixed(3) }}%</td>
<td>{{ trade.open_date }}</td>
<td>{{ trade.close_date }}</td>
</tr>
</tbody>
</table>
<div class="card-body">
<table v-if="trades" class="table table-sm table-hover">
<thead>
<tr>
<th>id</th>
<th>Pair</th>
<th>Amount</th>
<th>Stake amount</th>
<th>Open rate</th>
<th>{{ activeTrades ? 'Current rate' : 'Close rate' }}</th>
<th>{{ activeTrades ? 'Current Profit' : 'Profit' }}</th>
<th>Open date</th>
<th>Close date</th>
</tr>
</thead>
<tbody>
<tr v-for="(trade, index) in trades" :key="index">
<td>{{ trade.trade_id }}</td>
<td>{{ trade.pair }}</td>
<td>{{ trade.amount }}</td>
<td>{{ trade.stake_amount }}</td>
<td>{{ trade.open_rate }}</td>
<td>{{ activeTrades ? trade.current_rate : trade.close_rate }}</td>
<td>{{ activeTrades ? trade.current_profit : trade.close_profit.toFixed(3) }}%</td>
<td>{{ trade.open_date }}</td>
<td>{{ trade.close_date }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>

View File

@ -80,12 +80,12 @@ export default {
</script>
<style scoped>
.open-trades {
.scrollpanel .open-trades {
max-height: 300px;
overflow-y: scroll;
min-height: 250px;
}
.trade-history {
max-height: 300px;
max-height: 500px;
overflow-y: scroll;
}
</style>

View File

@ -39,7 +39,6 @@ export default {
state.profit = profit;
},
updateState(state, botState) {
console.log(botState);
state.botState = botState;
},
},