2023-05-23 18:27:33 +00:00
|
|
|
<template>
|
2023-05-30 18:43:35 +00:00
|
|
|
<div>
|
2023-05-26 11:12:40 +00:00
|
|
|
<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"
|
2023-05-29 21:36:23 +00:00
|
|
|
:disabled="pairlistStore.whitelist.length == 0"
|
2023-05-26 11:12:40 +00:00
|
|
|
:active="currentView === 'results'"
|
|
|
|
@click="currentView = 'results'"
|
|
|
|
>Results</b-button
|
|
|
|
>
|
|
|
|
</b-button-group>
|
|
|
|
|
2023-05-29 21:36:23 +00:00
|
|
|
<PairlistConfigurator v-if="currentView == 'configurator'" />
|
2023-05-26 11:12:40 +00:00
|
|
|
|
2023-05-29 21:36:23 +00:00
|
|
|
<PairlistConfigResults v-show="currentView == 'results'" />
|
2023-05-23 18:27:33 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2023-05-29 21:36:23 +00:00
|
|
|
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';
|
2023-05-26 11:12:40 +00:00
|
|
|
import PairlistConfigResults from '@/components/ftbot/PairlistConfigResults.vue';
|
2023-05-23 18:27:33 +00:00
|
|
|
|
2023-05-29 21:36:23 +00:00
|
|
|
const pairlistStore = usePairlistConfigStore();
|
2023-05-26 11:12:40 +00:00
|
|
|
const currentView = ref<'configurator' | 'results'>('configurator');
|
2023-05-23 18:27:33 +00:00
|
|
|
|
2023-05-29 21:36:23 +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>
|