Enforce selection of one pair (disable refresh button if no pair is

selected)
This commit is contained in:
Matthias 2020-08-24 20:24:16 +02:00
parent a8cba2538d
commit f5636273f4

View File

@ -5,7 +5,7 @@
<b-checkbox v-model="historicView">HistoricData</b-checkbox> <b-checkbox v-model="historicView">HistoricData</b-checkbox>
</div> </div>
<div class="col-mb-2 ml-2 mr-2"> <div class="col-mb-2 ml-2 mr-2">
<b-button @click="refresh">&#x21bb;</b-button> <b-button @click="refresh" :disabled="!!!pair">&#x21bb;</b-button>
</div> </div>
<div class="col-mb-2"> <div class="col-mb-2">
<b-select v-model="pair" :options="historicView ? pairlist : whitelist" @change="refresh"> <b-select v-model="pair" :options="historicView ? pairlist : whitelist" @change="refresh">
@ -44,7 +44,7 @@ const ftbot = namespace('ftbot');
components: { CandleChartContainer, StrategyList, TimeRangeSelect }, components: { CandleChartContainer, StrategyList, TimeRangeSelect },
}) })
export default class Graphs extends Vue { export default class Graphs extends Vue {
pair = 'XRP/USDT'; pair = '';
timeframe = '5m'; timeframe = '5m';
@ -81,7 +81,9 @@ export default class Graphs extends Vue {
mounted() { mounted() {
this.getWhitelist(); this.getWhitelist();
this.refresh(); this.refresh();
this.getAvailablePairs({ timeframe: this.timeframe }); this.getAvailablePairs({ timeframe: this.timeframe }).then((val) => {
console.log(val);
});
} }
get dataset() { get dataset() {