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">
|
2023-06-07 17:26:33 +00:00
|
|
|
<b-button
|
|
|
|
title="Save configuration"
|
|
|
|
size="sm"
|
2023-06-09 18:47:34 +00:00
|
|
|
variant="primary"
|
2023-06-07 17:26:33 +00:00
|
|
|
@click="pairlistStore.saveConfig(pairlistStore.config.name)"
|
|
|
|
>
|
|
|
|
<i-mdi-content-save />
|
|
|
|
</b-button>
|
2023-06-06 14:39:32 +00:00
|
|
|
<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"
|
2023-06-07 17:26:33 +00:00
|
|
|
@duplicate="(oldName:string,newName:string) => pairlistStore.duplicateConfig(newName)"
|
2023-06-06 14:39:32 +00:00
|
|
|
@new="(name:string) => pairlistStore.newConfig(name)"
|
2023-06-07 17:26:33 +00:00
|
|
|
@rename="(oldName: string, newName:string) => pairlistStore.saveConfig(newName)"
|
2023-06-06 14:39:32 +00:00
|
|
|
>
|
|
|
|
<b-form-select
|
2023-06-07 17:26:33 +00:00
|
|
|
v-model="pairlistStore.configName"
|
2023-06-06 14:39:32 +00:00
|
|
|
size="sm"
|
2023-06-07 17:26:33 +00:00
|
|
|
:options="pairlistStore.savedConfigs.map((c) => c.name)"
|
|
|
|
@change="(config) => pairlistStore.selectOrCreateConfig(config)"
|
2023-06-06 14:39:32 +00:00
|
|
|
/>
|
|
|
|
</edit-value>
|
2023-06-01 15:51:16 +00:00
|
|
|
<b-button
|
|
|
|
title="Evaluate pairlist"
|
|
|
|
:disabled="pairlistStore.evaluating || !pairlistStore.pairlistValid"
|
|
|
|
variant="primary"
|
2023-06-07 18:59:57 +00:00
|
|
|
class="px-5"
|
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>
|