2023-05-30 11:28:55 +00:00
|
|
|
<template>
|
|
|
|
<b-card no-body class="mb-2">
|
|
|
|
<template #header>
|
2023-05-30 18:43:35 +00:00
|
|
|
<div
|
2023-05-31 18:55:11 +00:00
|
|
|
class="d-flex flex-row align-items-center justify-content-between"
|
2023-05-30 18:43:35 +00:00
|
|
|
role="button"
|
|
|
|
@click="visible = !visible"
|
|
|
|
>
|
2023-05-31 18:55:11 +00:00
|
|
|
<span class="fw-bold fd-italic">Blacklist</span>
|
|
|
|
<i-mdi-chevron-down
|
|
|
|
v-if="!visible"
|
|
|
|
:class="!visible ? 'visible' : 'invisible'"
|
|
|
|
role="button"
|
|
|
|
class="fs-4"
|
|
|
|
@click="visible = !visible"
|
|
|
|
/>
|
|
|
|
<i-mdi-chevron-up
|
|
|
|
v-if="visible"
|
|
|
|
:class="visible ? 'visible' : 'invisible'"
|
|
|
|
role="button"
|
|
|
|
class="fs-4"
|
|
|
|
@click="visible = !visible"
|
|
|
|
/>
|
2023-05-30 11:28:55 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2023-05-31 20:36:04 +00:00
|
|
|
<b-collapse v-model="visible">
|
|
|
|
<b-card-body>
|
2023-06-09 11:02:21 +00:00
|
|
|
<div class="d-flex mb-4 align-items-center gap-2">
|
|
|
|
<span class="col-auto">Copy from:</span
|
2023-06-09 12:45:56 +00:00
|
|
|
><b-form-select v-model="copyFromConfig" size="sm" :options="configNames" />
|
2023-06-09 11:02:21 +00:00
|
|
|
<b-button title="Copy" size="sm" @click="pairlistStore.duplicateBlacklist(copyFromConfig)"
|
|
|
|
><i-mdi-content-copy
|
|
|
|
/></b-button>
|
|
|
|
</div>
|
|
|
|
<b-input-group v-for="(item, i) in pairlistStore.config.blacklist" :key="i" class="mb-2">
|
|
|
|
<b-form-input v-model="pairlistStore.config.blacklist[i]" />
|
2023-05-31 20:36:04 +00:00
|
|
|
<b-input-group-append>
|
|
|
|
<b-button size="sm" @click="pairlistStore.removeFromBlacklist(i)"
|
|
|
|
><i-mdi-close
|
|
|
|
/></b-button>
|
|
|
|
</b-input-group-append>
|
|
|
|
</b-input-group>
|
|
|
|
<b-button @click="pairlistStore.addToBlacklist()">Add</b-button>
|
|
|
|
</b-card-body>
|
|
|
|
</b-collapse>
|
2023-05-30 11:28:55 +00:00
|
|
|
</b-card>
|
|
|
|
</template>
|
2023-06-04 07:24:11 +00:00
|
|
|
<script setup lang="ts">
|
2023-06-09 12:45:56 +00:00
|
|
|
import { computed, ref } from 'vue';
|
2023-05-30 11:28:55 +00:00
|
|
|
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
|
|
|
|
const pairlistStore = usePairlistConfigStore();
|
2023-06-09 12:45:56 +00:00
|
|
|
const copyFromConfig = ref('');
|
2023-05-30 11:28:55 +00:00
|
|
|
const visible = ref(false);
|
2023-06-09 12:45:56 +00:00
|
|
|
|
|
|
|
const configNames = computed(() =>
|
|
|
|
pairlistStore.savedConfigs.filter((c) => c.name !== pairlistStore.config.name).map((c) => c.name),
|
|
|
|
);
|
2023-05-30 11:28:55 +00:00
|
|
|
</script>
|
2023-05-31 18:55:11 +00:00
|
|
|
<style lang="scss" scoped></style>
|