2023-05-30 15:45:03 +00:00
|
|
|
<template>
|
2023-06-06 14:39:32 +00:00
|
|
|
<div class="d-flex mb-2 gap-2">
|
|
|
|
<edit-value
|
|
|
|
v-model="pairlistStore.config.name"
|
|
|
|
editable-name="config"
|
|
|
|
:allow-add="true"
|
|
|
|
:allow-duplicate="true"
|
|
|
|
:allow-edit="true"
|
|
|
|
class="d-flex flex-grow-1"
|
|
|
|
@delete="pairlistStore.deleteConfig"
|
|
|
|
@duplicate="(oldName:string,newName:string) => pairlistStore.duplicateConfig(oldName, newName)"
|
|
|
|
@new="(name:string) => pairlistStore.newConfig(name)"
|
|
|
|
@rename="(oldName: string, newName:string) => pairlistStore.renameOrSaveConfig(oldName,newName)"
|
|
|
|
>
|
|
|
|
<b-form-select
|
|
|
|
v-model="pairlistStore.config"
|
|
|
|
size="sm"
|
|
|
|
:options="
|
|
|
|
pairlistStore.savedConfigs.map((c) => {
|
|
|
|
return { text: c.name, value: c };
|
|
|
|
})
|
|
|
|
"
|
|
|
|
/>
|
|
|
|
</edit-value>
|
2023-06-01 15:51:16 +00:00
|
|
|
<b-button
|
|
|
|
title="Evaluate pairlist"
|
|
|
|
:disabled="pairlistStore.evaluating || !pairlistStore.pairlistValid"
|
|
|
|
variant="primary"
|
|
|
|
class="col-lg-2"
|
2023-06-06 14:39:32 +00:00
|
|
|
size="sm"
|
2023-06-01 15:51:16 +00:00
|
|
|
@click="pairlistStore.startPairlistEvaluation()"
|
|
|
|
>
|
|
|
|
<b-spinner v-if="pairlistStore.evaluating" small></b-spinner>
|
|
|
|
<span>{{ pairlistStore.evaluating ? '' : 'Evaluate' }}</span>
|
|
|
|
</b-button>
|
|
|
|
</div>
|
2023-05-30 15:45:03 +00:00
|
|
|
</template>
|
2023-06-04 07:24:11 +00:00
|
|
|
<script setup lang="ts">
|
2023-05-30 15:45:03 +00:00
|
|
|
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
|
2023-06-06 14:39:32 +00:00
|
|
|
import EditValue from '../general/EditValue.vue';
|
2023-05-30 15:45:03 +00:00
|
|
|
const pairlistStore = usePairlistConfigStore();
|
|
|
|
</script>
|