mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
remove separate results view for now
This commit is contained in:
parent
7dde1648fc
commit
c3378f0f26
|
@ -59,16 +59,24 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-3">
|
<div class="col-12 col-lg-3">
|
||||||
|
<b-form-radio-group v-model="selectedView" class="mb-2" size="sm" buttons>
|
||||||
|
<b-form-radio button value="Config"> Config</b-form-radio>
|
||||||
|
<b-form-radio button value="Results" :disabled="pairlistStore.whitelist.length === 0">
|
||||||
|
Results</b-form-radio
|
||||||
|
>
|
||||||
|
</b-form-radio-group>
|
||||||
<CopyableTextfield
|
<CopyableTextfield
|
||||||
|
v-if="selectedView === 'Config'"
|
||||||
:content="pairlistStore.configJSON"
|
:content="pairlistStore.configJSON"
|
||||||
:is-valid="pairlistStore.pairlistValid"
|
:is-valid="pairlistStore.pairlistValid"
|
||||||
/>
|
/>
|
||||||
|
<CopyableTextfield v-if="selectedView === 'Results'" :content="pairlistStore.whitelist" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
|
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
|
||||||
import PairlistConfigItem from './PairlistConfigItem.vue';
|
import PairlistConfigItem from './PairlistConfigItem.vue';
|
||||||
|
@ -85,6 +93,7 @@ const pairlistStore = usePairlistConfigStore();
|
||||||
const availablePairlists = ref<Pairlist[]>([]);
|
const availablePairlists = ref<Pairlist[]>([]);
|
||||||
const pairlistConfigsEl = ref<HTMLElement | null>(null);
|
const pairlistConfigsEl = ref<HTMLElement | null>(null);
|
||||||
const availablePairlistsEl = ref<HTMLElement | null>(null);
|
const availablePairlistsEl = ref<HTMLElement | null>(null);
|
||||||
|
const selectedView = ref<'Config' | 'Results'>('Config');
|
||||||
|
|
||||||
// v-for updates with sorting, deleting and adding items seem to get wonky without unique keys for every item
|
// v-for updates with sorting, deleting and adding items seem to get wonky without unique keys for every item
|
||||||
const pairlistsComp = computed(() =>
|
const pairlistsComp = computed(() =>
|
||||||
|
@ -141,6 +150,13 @@ onMounted(async () => {
|
||||||
pairlistStore.savedConfigs.length > 0 ? pairlistStore.savedConfigs[0].name : 'default',
|
pairlistStore.savedConfigs.length > 0 ? pairlistStore.savedConfigs[0].name : 'default',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => pairlistStore.whitelist,
|
||||||
|
() => {
|
||||||
|
selectedView.value = 'Results';
|
||||||
|
},
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -1,42 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<PairlistConfigurator class="pt-4" />
|
||||||
<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'" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
|
|
||||||
import { ref, watch } from 'vue';
|
|
||||||
import PairlistConfigurator from '@/components/ftbot/PairlistConfigurator.vue';
|
import PairlistConfigurator from '@/components/ftbot/PairlistConfigurator.vue';
|
||||||
import PairlistConfigResults from '@/components/ftbot/PairlistConfigResults.vue';
|
|
||||||
|
|
||||||
const pairlistStore = usePairlistConfigStore();
|
|
||||||
const currentView = ref<'configurator' | 'results'>('configurator');
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => pairlistStore.evaluating,
|
|
||||||
(newVal: boolean, oldVal: boolean) => {
|
|
||||||
if (oldVal === true && newVal === false) {
|
|
||||||
currentView.value = 'results';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user