mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Add copy button to pairlist config
This commit is contained in:
parent
47d65eb3e2
commit
159d5bc307
|
@ -58,12 +58,18 @@
|
||||||
size="lg"
|
size="lg"
|
||||||
squared
|
squared
|
||||||
class="mt-2 evaluate"
|
class="mt-2 evaluate"
|
||||||
@click="test"
|
@click="evaluateClick"
|
||||||
>Evaluate</b-button
|
>Evaluate</b-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="12" md="3">
|
<b-col cols="12" md="3">
|
||||||
|
<i-mdi-content-copy
|
||||||
|
v-if="isSupported"
|
||||||
|
role="button"
|
||||||
|
class="position-absolute end-0 me-3"
|
||||||
|
@click="copy(configJSON)"
|
||||||
|
/>
|
||||||
<pre class="text-start"><code>{{ configJSON }}</code></pre>
|
<pre class="text-start"><code>{{ configJSON }}</code></pre>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
@ -76,6 +82,7 @@ import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
import PairlistConfigItem from './PairlistConfigItem.vue';
|
import PairlistConfigItem from './PairlistConfigItem.vue';
|
||||||
import { Pairlist, PairlistConfig, PairlistParamType, PairlistPayloadItem } from '@/types';
|
import { Pairlist, PairlistConfig, PairlistParamType, PairlistPayloadItem } from '@/types';
|
||||||
import { useSortable, moveArrayElement } from '@vueuse/integrations/useSortable';
|
import { useSortable, moveArrayElement } from '@vueuse/integrations/useSortable';
|
||||||
|
import { useClipboard } from '@vueuse/core';
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
'update:modelValue',
|
'update:modelValue',
|
||||||
|
@ -178,7 +185,9 @@ async function save() {
|
||||||
emit('saveConfig', config.value);
|
emit('saveConfig', config.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function test() {
|
const { copy, isSupported } = useClipboard();
|
||||||
|
|
||||||
|
async function evaluateClick() {
|
||||||
const payload = configToPayload();
|
const payload = configToPayload();
|
||||||
|
|
||||||
evaluating.value = true;
|
evaluating.value = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user