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-column flex-shrink">
|
||||
<h4 class="text-start">Select Pairs</h4>
|
||||
<div v-for="(pair, index) in pairs" :key="index">
|
||||
<BFormInput v-model="pairs[index]" placeholder="Pair"></BFormInput>
|
||||
</div>
|
||||
<BaseStringList v-model="pairs" placeholder="Pair" size="md" />
|
||||
</div>
|
||||
<BButton variant="primary" title="Add Pair" @click="addPair"><i-mdi-plus /></BButton>
|
||||
|
||||
<div class="d-flex flex-column gap-1">
|
||||
<BButton
|
||||
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-column flex-shrink">
|
||||
<h4 class="text-start">Select timeframes</h4>
|
||||
<div v-for="(tf, index) in timeframes" :key="index">
|
||||
<BFormInput v-model="timeframes[index]" placeholder="Timeframe"></BFormInput>
|
||||
</div>
|
||||
<BaseStringList v-model="timeframes" placeholder="Timeframe" size="md" />
|
||||
</div>
|
||||
<BButton variant="primary" title="Add timeframe" @click="addTimeframe"
|
||||
><i-mdi-plus
|
||||
/></BButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-2 border rounded-1 p-2 text-start">
|
||||
|
|
|
@ -1,14 +1,24 @@
|
|||
<script setup lang="ts">
|
||||
const values = defineModel<string[]>({ required: true });
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
placeholder?: string;
|
||||
size?: string;
|
||||
}>(),
|
||||
{
|
||||
placeholder: '',
|
||||
size: 'sm',
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="d-flex flex-row gap-2">
|
||||
<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">
|
||||
<BFormInput v-model="values[idx]" size="sm"></BFormInput>
|
||||
<BFormInput v-model="values[idx]" size="sm" :placeholder="placeholder"></BFormInput>
|
||||
<BButton
|
||||
size="sm"
|
||||
:size="size"
|
||||
variant="outline-secondary"
|
||||
title="Delete this value."
|
||||
@click="values.splice(idx, 1)"
|
||||
|
@ -18,7 +28,7 @@ const values = defineModel<string[]>({ required: true });
|
|||
</div>
|
||||
</div>
|
||||
<BButton
|
||||
size="sm"
|
||||
:size="size"
|
||||
:title="`Add new value`"
|
||||
variant="secondary"
|
||||
class="ms-auto mt-auto"
|
||||
|
|
Loading…
Reference in New Issue
Block a user