frequi_origin/src/views/PairlistConfigView.vue

43 lines
1.2 KiB
Vue
Raw Normal View History

2023-05-23 18:27:33 +00:00
<template>
2023-05-30 18:43:35 +00:00
<div>
<b-button-group class="py-3">
<b-button
v-model="currentView"
:active="currentView === 'configurator'"
@click="currentView = 'configurator'"
>Configurator</b-button
>
<b-button
v-model="currentView"
:disabled="pairlistStore.whitelist.length == 0"
:active="currentView === 'results'"
@click="currentView = 'results'"
>Results</b-button
>
</b-button-group>
<PairlistConfigurator v-if="currentView == 'configurator'" />
<PairlistConfigResults v-show="currentView == 'results'" />
2023-05-23 18:27:33 +00:00
</div>
</template>
<script setup lang="ts">
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
import { ref, watch } from 'vue';
2023-05-23 18:27:33 +00:00
import PairlistConfigurator from '@/components/ftbot/PairlistConfigurator.vue';
import PairlistConfigResults from '@/components/ftbot/PairlistConfigResults.vue';
2023-05-23 18:27:33 +00:00
const pairlistStore = usePairlistConfigStore();
const currentView = ref<'configurator' | 'results'>('configurator');
2023-05-23 18:27:33 +00:00
watch(
() => pairlistStore.evaluating,
(newVal: boolean, oldVal: boolean) => {
if (oldVal === true && newVal === false) {
currentView.value = 'results';
}
},
);
2023-05-23 18:27:33 +00:00
</script>