mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
parent
1100e69741
commit
6e20c88e7f
|
@ -3,12 +3,22 @@
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<label class="mr-auto h3">Balance</label>
|
<label class="mr-auto h3">Balance</label>
|
||||||
<b-button class="float-right" size="sm" @click="getBalance">↻</b-button>
|
<b-button class="float-right" size="sm" @click="getBalance">↻</b-button>
|
||||||
|
<b-form-checkbox
|
||||||
|
v-model="hideSmallBalances"
|
||||||
|
class="float-right"
|
||||||
|
size="sm"
|
||||||
|
title="Hide small balances"
|
||||||
|
button
|
||||||
|
>
|
||||||
|
<HideIcon v-if="hideSmallBalances" :size="16" />
|
||||||
|
<ShowIcon v-else :size="16" />
|
||||||
|
</b-form-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p v-if="balance.note">
|
<p v-if="balance.note">
|
||||||
<strong>{{ balance.note }}</strong>
|
<strong>{{ balance.note }}</strong>
|
||||||
</p>
|
</p>
|
||||||
<b-table class="table-sm" :items="balance.currencies" :fields="tableFields">
|
<b-table class="table-sm" :items="balanceCurrencies" :fields="tableFields">
|
||||||
<template slot="bottom-row">
|
<template slot="bottom-row">
|
||||||
<td><strong>Total</strong></td>
|
<td><strong>Total</strong></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
@ -26,15 +36,31 @@
|
||||||
import { Component, Vue } from 'vue-property-decorator';
|
import { Component, Vue } from 'vue-property-decorator';
|
||||||
import { namespace } from 'vuex-class';
|
import { namespace } from 'vuex-class';
|
||||||
import { BalanceInterface } from '@/types';
|
import { BalanceInterface } from '@/types';
|
||||||
|
import HideIcon from 'vue-material-design-icons/EyeOff.vue';
|
||||||
|
import ShowIcon from 'vue-material-design-icons/Eye.vue';
|
||||||
|
|
||||||
const ftbot = namespace('ftbot');
|
const ftbot = namespace('ftbot');
|
||||||
|
|
||||||
@Component({})
|
@Component({
|
||||||
|
components: { HideIcon, ShowIcon },
|
||||||
|
})
|
||||||
export default class Balance extends Vue {
|
export default class Balance extends Vue {
|
||||||
@ftbot.Action getBalance;
|
@ftbot.Action getBalance;
|
||||||
|
|
||||||
@ftbot.State balance!: BalanceInterface;
|
@ftbot.State balance!: BalanceInterface;
|
||||||
|
|
||||||
|
hideSmallBalances = true;
|
||||||
|
|
||||||
|
smallBalance = 0.00001;
|
||||||
|
|
||||||
|
get balanceCurrencies() {
|
||||||
|
if (!this.hideSmallBalances) {
|
||||||
|
return this.balance.currencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.balance.currencies.filter((v) => v.est_stake >= this.smallBalance);
|
||||||
|
}
|
||||||
|
|
||||||
get tableFields() {
|
get tableFields() {
|
||||||
return [
|
return [
|
||||||
{ key: 'currency', label: 'Currency' },
|
{ key: 'currency', label: 'Currency' },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user