Keep selected pair active

This commit is contained in:
Matthias 2021-01-15 20:42:20 +01:00
parent 96ee63cec8
commit de1035545e

View File

@ -7,6 +7,7 @@
:key="comb.pair" :key="comb.pair"
button button
class="d-flex justify-content-between align-items-center py-1" class="d-flex justify-content-between align-items-center py-1"
:active="comb.pair === selectedPair"
@click="setSelectedPair(comb.pair)" @click="setSelectedPair(comb.pair)"
> >
<div> <div>
@ -22,6 +23,7 @@
<script lang="ts"> <script lang="ts">
import { formatPercent, timestampms } from '@/shared/formatters'; import { formatPercent, timestampms } from '@/shared/formatters';
import { BotStoreGetters } from '@/store/modules/ftbot';
import { Lock, Trade } from '@/types'; import { Lock, Trade } from '@/types';
import { Component, Prop, Vue } from 'vue-property-decorator'; import { Component, Prop, Vue } from 'vue-property-decorator';
import { namespace } from 'vuex-class'; import { namespace } from 'vuex-class';
@ -51,6 +53,8 @@ export default class PairSummary extends Vue {
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
@ftbot.Action setSelectedPair!: (pair: string) => void; @ftbot.Action setSelectedPair!: (pair: string) => void;
@ftbot.Getter [BotStoreGetters.selectedPair]!: string;
timestampms = timestampms; timestampms = timestampms;
formatPercent = formatPercent; formatPercent = formatPercent;