mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-24 03:55:15 +00:00
feat: use BaseStringList for download-data, enhance Stringlist component
This commit is contained in:
parent
8e5e56dd67
commit
9231c29058
|
@ -55,11 +55,9 @@ async function startDownload() {
|
||||||
<div class="d-flex flex-fill align-items-end gap-2">
|
<div class="d-flex flex-fill align-items-end gap-2">
|
||||||
<div class="d-flex flex-column flex-shrink">
|
<div class="d-flex flex-column flex-shrink">
|
||||||
<h4 class="text-start">Select Pairs</h4>
|
<h4 class="text-start">Select Pairs</h4>
|
||||||
<div v-for="(pair, index) in pairs" :key="index">
|
<BaseStringList v-model="pairs" placeholder="Pair" size="md" />
|
||||||
<BFormInput v-model="pairs[index]" placeholder="Pair"></BFormInput>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<BButton variant="primary" title="Add Pair" @click="addPair"><i-mdi-plus /></BButton>
|
|
||||||
<div class="d-flex flex-column gap-1">
|
<div class="d-flex flex-column gap-1">
|
||||||
<BButton
|
<BButton
|
||||||
v-for="pt in pairTemplates"
|
v-for="pt in pairTemplates"
|
||||||
|
@ -75,13 +73,8 @@ async function startDownload() {
|
||||||
<div class="d-flex flex-fill align-items-end gap-2">
|
<div class="d-flex flex-fill align-items-end gap-2">
|
||||||
<div class="d-flex flex-column flex-shrink">
|
<div class="d-flex flex-column flex-shrink">
|
||||||
<h4 class="text-start">Select timeframes</h4>
|
<h4 class="text-start">Select timeframes</h4>
|
||||||
<div v-for="(tf, index) in timeframes" :key="index">
|
<BaseStringList v-model="timeframes" placeholder="Timeframe" size="md" />
|
||||||
<BFormInput v-model="timeframes[index]" placeholder="Timeframe"></BFormInput>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<BButton variant="primary" title="Add timeframe" @click="addTimeframe"
|
|
||||||
><i-mdi-plus
|
|
||||||
/></BButton>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2 border rounded-1 p-2 text-start">
|
<div class="mb-2 border rounded-1 p-2 text-start">
|
||||||
|
|
|
@ -1,14 +1,24 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const values = defineModel<string[]>({ required: true });
|
const values = defineModel<string[]>({ required: true });
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
placeholder?: string;
|
||||||
|
size?: string;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
placeholder: '',
|
||||||
|
size: 'sm',
|
||||||
|
},
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="d-flex flex-row gap-2">
|
<div class="d-flex flex-row gap-2">
|
||||||
<div class="d-flex gap-1 flex-column w-100">
|
<div class="d-flex gap-1 flex-column w-100">
|
||||||
<div v-for="(val, idx) in values" :key="idx" class="d-flex flex-row gap-1">
|
<div v-for="(val, idx) in values" :key="idx" class="d-flex flex-row gap-1">
|
||||||
<BFormInput v-model="values[idx]" size="sm"></BFormInput>
|
<BFormInput v-model="values[idx]" size="sm" :placeholder="placeholder"></BFormInput>
|
||||||
<BButton
|
<BButton
|
||||||
size="sm"
|
:size="size"
|
||||||
variant="outline-secondary"
|
variant="outline-secondary"
|
||||||
title="Delete this value."
|
title="Delete this value."
|
||||||
@click="values.splice(idx, 1)"
|
@click="values.splice(idx, 1)"
|
||||||
|
@ -18,7 +28,7 @@ const values = defineModel<string[]>({ required: true });
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<BButton
|
<BButton
|
||||||
size="sm"
|
:size="size"
|
||||||
:title="`Add new value`"
|
:title="`Add new value`"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
class="ms-auto mt-auto"
|
class="ms-auto mt-auto"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user