chore: first batch of bootstrap-vue PascalCase

This commit is contained in:
Matthias 2024-07-05 12:34:14 +02:00
parent 09d3239c53
commit 97b6cc4211
33 changed files with 306 additions and 315 deletions

View File

@ -3,7 +3,7 @@
<span class="me-2">{{ bot.botName || bot.botId }}</span>
<div class="align-items-center d-flex">
<b-form-checkbox
<BFormCheckbox
v-model="autoRefreshLoc"
class="ms-auto float-end me-2 my-auto mt-1"
title="AutoRefresh"
@ -23,9 +23,9 @@
<div v-else title="Login info expired, please login again.">
<i-mdi-cancel class="offline" />
</div>
</b-form-checkbox>
</BFormCheckbox>
<div v-if="!noButtons" class="float-end d-flex flex-align-center">
<b-button
<BButton
v-if="botStore.botStores[bot.botId].isBotLoggedIn"
class="ms-1"
size="sm"
@ -33,16 +33,16 @@
@click="$emit('edit')"
>
<i-mdi-pencil />
</b-button>
<b-button v-else class="ms-1" size="sm" title="Login again" @click="$emit('editLogin')">
</BButton>
<BButton v-else class="ms-1" size="sm" title="Login again" @click="$emit('editLogin')">
<i-mdi-login />
</b-button>
<b-button class="ms-1" size="sm" title="Delete bot" @click="botRemoveModalVisible = true">
</BButton>
<BButton class="ms-1" size="sm" title="Delete bot" @click="botRemoveModalVisible = true">
<i-mdi-delete />
</b-button>
</BButton>
</div>
</div>
<b-modal
<BModal
v-if="!noButtons"
id="removeBotModal"
v-model="botRemoveModalVisible"
@ -50,7 +50,7 @@
@ok="confirmRemoveBot"
>
Really remove (logout) from {{ bot.botName }} ({{ bot.botId }})?
</b-modal>
</BModal>
</div>
</template>

View File

@ -1,8 +1,8 @@
<template>
<div v-if="botStore.botCount > 0">
<h3 v-if="!small">Available bots</h3>
<b-list-group ref="sortContainer">
<b-list-group-item
<BListGroup ref="sortContainer">
<BListGroupItem
v-for="bot in botListComp"
:key="bot.botId"
:active="bot.botId === botStore.selectedBot"
@ -28,8 +28,8 @@
@edit="editBot(bot.botId)"
@edit-login="editBotLogin(bot.botId)"
/>
</b-list-group-item>
</b-list-group>
</BListGroupItem>
</BListGroup>
<LoginModal v-if="!small" ref="loginModal" class="mt-2" login-text="Add new bot" />
</div>
</template>

View File

@ -1,69 +1,69 @@
<template>
<div>
<form ref="formRef" novalidate @submit.stop.prevent="handleSubmit" @reset="handleReset">
<b-form-group label="Bot Name" label-for="name-input">
<b-form-input
<BFormGroup label="Bot Name" label-for="name-input">
<BFormInput
id="name-input"
v-model="auth.botName"
placeholder="Bot Name"
@keydown.enter="handleOk"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
:state="urlState"
label="API Url"
label-for="url-input"
invalid-feedback="API Url required"
>
<b-form-input
<BFormInput
id="url-input"
v-model="auth.url"
required
trim
:state="urlState"
@keydown.enter="handleOk"
></b-form-input>
<b-alert
></BFormInput>
<BAlert
v-if="urlDuplicate"
class="mt-2 p-1 alert-wrap"
:model-value="true"
variant="warning"
>
This URL is already in use by another bot.
</b-alert>
</b-form-group>
<b-form-group
</BAlert>
</BFormGroup>
<BFormGroup
:state="nameState"
label="Username"
label-for="username-input"
invalid-feedback="Name and Password are required."
>
<b-form-input
<BFormInput
id="username-input"
v-model="auth.username"
required
placeholder="Freqtrader"
:state="nameState"
@keydown.enter="handleOk"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
label="Password"
label-for="password-input"
invalid-feedback="Invalid Password"
:state="pwdState"
>
<b-form-input
<BFormInput
id="password-input"
v-model="auth.password"
required
type="password"
:state="pwdState"
@keydown.enter="handleOk"
></b-form-input>
</b-form-group>
></BFormInput>
</BFormGroup>
<div>
<b-alert v-if="errorMessage" class="alert-wrap" :model-value="true" variant="warning">
<BAlert v-if="errorMessage" class="alert-wrap" :model-value="true" variant="warning">
{{ errorMessage }}
<br />
<span v-if="errorMessageCORS"
@ -72,11 +72,11 @@
>Freqtrade CORS documentation</a
></span
>
</b-alert>
</BAlert>
</div>
<div v-if="inModal === false" class="float-end">
<b-button class="me-2" type="reset" variant="danger">Reset</b-button>
<b-button type="submit" variant="primary">Submit</b-button>
<BButton class="me-2" type="reset" variant="danger">Reset</BButton>
<BButton type="submit" variant="primary">Submit</BButton>
</div>
</form>
</div>

View File

@ -1,6 +1,6 @@
<template>
<form class="d-flex" @submit.prevent="save">
<b-form-input
<BFormInput
v-model="newName"
size="sm"
class="w-100"
@ -10,13 +10,13 @@
/>
<div class="d-flex ms-2 no-min-w">
<b-button type="submit" size="sm" title="Save" class="no-min-w">
<BButton type="submit" size="sm" title="Save" class="no-min-w">
<i-mdi-check />
</b-button>
</BButton>
<b-button class="ms-1 no-min-w" size="sm" title="Cancel" @click="$emit('cancelled')">
<BButton class="ms-1 no-min-w" size="sm" title="Cancel" @click="$emit('cancelled')">
<i-mdi-close />
</b-button>
</BButton>
</div>
</form>
</template>

View File

@ -1,7 +1,7 @@
<template>
<div>
<b-button @click="openLoginModal()"><i-mdi-login class="me-1" />{{ loginText }}</b-button>
<b-modal
<BButton @click="openLoginModal()"><i-mdi-login class="me-1" />{{ loginText }}</BButton>
<BModal
id="modal-prevent-closing"
v-model="loginViewOpen"
title="Login to your bot"
@ -13,7 +13,7 @@
:existing-auth="loginInfo"
@login-result="handleLoginResult"
/>
</b-modal>
</BModal>
</div>
</template>

View File

@ -1,7 +1,7 @@
<template>
<b-nav-item @click="toggleNight">
<BNavItem @click="toggleNight">
<i-mdi-brightness-6 />
</b-nav-item>
</BNavItem>
</template>
<script setup lang="ts">

View File

@ -15,7 +15,7 @@
>
</VSelect>
<b-button
<BButton
title="Refresh chart"
class="ms-2"
:disabled="!!!botStore.activeBot.plotPair || isLoadingDataset"
@ -23,8 +23,8 @@
@click="refresh"
>
<i-mdi-refresh />
</b-button>
<b-spinner v-if="isLoadingDataset" small class="ms-2" label="Spinning" />
</BButton>
<BSpinner v-if="isLoadingDataset" small class="ms-2" label="Spinning" />
<div class="d-flex flex-column">
<div class="d-flex flex-row flex-wrap">
<small v-if="dataset" class="ms-2 text-nowrap" title="Long entry signals"
@ -45,8 +45,8 @@
</div>
</div>
<div class="ms-auto d-flex align-items-center w-auto">
<b-form-checkbox v-model="settingsStore.useHeikinAshiCandles"
><small class="text-nowrap">Heikin Ashi</small></b-form-checkbox
<BFormCheckbox v-model="settingsStore.useHeikinAshiCandles"
><small class="text-nowrap">Heikin Ashi</small></BFormCheckbox
>
<div class="ms-2">
@ -54,9 +54,9 @@
</div>
<div class="ms-2 me-0 me-md-1">
<b-button size="sm" title="Plot configurator" @click="showConfigurator">
<BButton size="sm" title="Plot configurator" @click="showConfigurator">
<i-mdi-cog width="12" height="12" />
</b-button>
</BButton>
</div>
</div>
</div>
@ -76,7 +76,7 @@
:label-side="settingsStore.chartLabelSide"
/>
<div v-else class="m-auto">
<b-spinner v-if="isLoadingDataset" label="Spinning" />
<BSpinner v-if="isLoadingDataset" label="Spinning" />
<div v-else style="font-size: 1.5rem">
{{ noDatasetText }}
</div>
@ -92,7 +92,7 @@
</Transition>
</div>
</div>
<b-modal
<BModal
v-if="plotConfigModal"
id="plotConfiguratorModal"
v-model="showPlotConfigModal"
@ -101,7 +101,7 @@
hide-backdrop
>
<PlotConfigurator :is-visible="showPlotConfigModal" :columns="datasetColumns" />
</b-modal>
</BModal>
</div>
</template>

View File

@ -10,14 +10,14 @@
@new="plotStore.newPlotConfig"
@duplicate="plotStore.duplicatePlotConfig"
>
<b-form-select
<BFormSelect
id="plotConfigSelect"
v-model="plotStore.plotConfigName"
:options="plotStore.availablePlotConfigNames"
size="sm"
@update:model-value="plotStore.plotConfigChanged"
>
</b-form-select>
</BFormSelect>
</EditValue>
</template>

View File

@ -1,11 +1,11 @@
<template>
<div v-if="columns">
<b-form-group label="Plot config name" label-for="idPlotConfigName">
<BFormGroup label="Plot config name" label-for="idPlotConfigName">
<PlotConfigSelect allow-edit></PlotConfigSelect>
</b-form-group>
</BFormGroup>
<div class="col-mb-3">
<hr />
<b-form-group label="Target Plot" label-for="FieldSel">
<BFormGroup label="Target Plot" label-for="FieldSel">
<EditValue
v-model="selSubPlot"
:allow-edit="!isMainPlot"
@ -16,26 +16,26 @@
@delete="deleteSubplot"
@rename="renameSubplot"
>
<b-form-select id="FieldSel" v-model="selSubPlot" :options="subplots" :select-size="5">
</b-form-select>
<BFormSelect id="FieldSel" v-model="selSubPlot" :options="subplots" :select-size="5">
</BFormSelect>
</EditValue>
</b-form-group>
</BFormGroup>
</div>
<hr />
<div>
<b-form-group label="Indicators in this plot" label-for="selectedIndicators">
<b-form-select
<BFormGroup label="Indicators in this plot" label-for="selectedIndicators">
<BFormSelect
id="selectedIndicators"
v-model="selIndicatorName"
:disabled="addNewIndicator"
:options="usedColumns"
:select-size="4"
>
</b-form-select>
</b-form-group>
</BFormSelect>
</BFormGroup>
</div>
<div class="d-flex flex-row mt-1">
<b-button
<BButton
variant="secondary"
title="Remove indicator to plot"
size="sm"
@ -44,8 +44,8 @@
@click="removeIndicator"
>
Remove indicator
</b-button>
<b-button
</BButton>
<BButton
variant="primary"
title="Add indicator to plot"
size="sm"
@ -57,7 +57,7 @@
"
>
Add new indicator
</b-button>
</BButton>
</div>
<PlotIndicatorSelect
@ -72,14 +72,14 @@
<hr />
<div class="d-flex flex-row">
<b-button
<BButton
class="ms-1 col"
variant="secondary"
size="sm"
:disabled="addNewIndicator"
title="Reset to last saved configuration"
@click="loadPlotConfig"
>Reset</b-button
>Reset</BButton
>
<!--
@ -93,7 +93,7 @@
@click="clearConfig"
>Reset</b-button
> -->
<b-button
<BButton
:disabled="
(botStore.activeBot.isWebserverMode && botStore.activeBot.botApiVersion < 2.23) ||
!botStore.activeBot.isBotOnline ||
@ -105,8 +105,8 @@
@click="loadPlotConfigFromStrategy"
>
From strategy
</b-button>
<b-button
</BButton>
<BButton
id="showButton"
class="ms-1 col"
variant="secondary"
@ -114,10 +114,10 @@
:disabled="addNewIndicator"
title="Show configuration for easy transfer to a strategy"
@click="showConfig = !showConfig"
>{{ showConfig ? 'Hide' : 'Show' }}</b-button
>{{ showConfig ? 'Hide' : 'Show' }}</BButton
>
<b-button
<BButton
class="ms-1 col"
variant="primary"
size="sm"
@ -125,27 +125,27 @@
:disabled="addNewIndicator"
title="Save configuration"
@click="savePlotConfig"
>Save</b-button
>Save</BButton
>
</div>
<b-button
<BButton
v-if="showConfig"
class="ms-1 mt-1"
variant="secondary"
size="sm"
title="Load configuration from text box below"
@click="loadConfigFromString"
>Load from String</b-button
>Load from String</BButton
>
<div v-if="showConfig" class="col-mb-5 ms-1 mt-2">
<b-form-textarea
<BFormTextarea
id="TextArea"
v-model="plotConfigJson"
class="textArea"
size="sm"
:state="tempPlotConfigValid"
>
</b-form-textarea>
</BFormTextarea>
</div>
</div>
</template>

View File

@ -1,35 +1,34 @@
<template>
<div>
<div class="d-flex flex-col flex-xl-row justify-content-between mt-1">
<b-form-group class="col flex-grow-1" label="Type" label-for="plotTypeSelector">
<b-form-select
<BFormGroup class="col flex-grow-1" label="Type" label-for="plotTypeSelector">
<BFormSelect
id="plotTypeSelector"
v-model="graphType"
size="sm"
:options="availableGraphTypes"
>
</b-form-select>
</b-form-group>
<b-form-group label="Color" label-for="colsel" size="sm" class="ms-xl-1 col">
<b-input-group>
</BFormSelect>
</BFormGroup>
<BFormGroup label="Color" label-for="colsel" size="sm" class="ms-xl-1 col">
<BInputGroup>
<template #prepend>
<b-form-input
<BFormInput
v-model="selColor"
type="color"
size="sm"
class="p-0"
style="max-width: 29px"
></b-form-input>
></BFormInput>
</template>
<b-form-input id="colsel" v-model="selColor" size="sm" class="flex-grow-1">
</b-form-input>
<BFormInput id="colsel" v-model="selColor" size="sm" class="flex-grow-1"> </BFormInput>
<template #append>
<b-button variant="primary" size="sm" @click="newColor">
<BButton variant="primary" size="sm" @click="newColor">
<i-mdi-dice-multiple />
</b-button>
</BButton>
</template>
</b-input-group>
</b-form-group>
</BInputGroup>
</BFormGroup>
</div>
<PlotIndicatorSelect
v-if="graphType === ChartType.line"

View File

@ -1,6 +1,6 @@
<template>
<div class="d-flex flex-row">
<b-form-group class="flex-grow-1" :label="label" label-for="indicatorSelector">
<BFormGroup class="flex-grow-1" :label="label" label-for="indicatorSelector">
<VSelect
v-model="selAvailableIndicator"
:options="columns"
@ -9,10 +9,10 @@
@option:selected="emitIndicator"
>
</VSelect>
</b-form-group>
<b-button size="sm" title="Abort" class="ms-1 mt-auto" variant="secondary" @click="abort">
</BFormGroup>
<BButton size="sm" title="Abort" class="ms-1 mt-auto" variant="secondary" @click="abort">
<i-mdi-close />
</b-button>
</BButton>
</div>
</template>

View File

@ -3,7 +3,7 @@
<div class="flex-grow-1">
<ECharts v-if="trades" :option="chartOptions" autoresize :theme="settingsStore.chartTheme" />
</div>
<b-form-group
<BFormGroup
class="z-2"
:class="showTitle ? 'ms-5 ps-5' : 'position-absolute'"
label="Bins"
@ -13,14 +13,14 @@
content-cols="6"
size="sm"
>
<b-form-select
<BFormSelect
id="input-bins"
v-model="settingsStore.profitDistributionBins"
size="sm"
class="mt-1"
:options="binOptions"
></b-form-select>
</b-form-group>
></BFormSelect>
</BFormGroup>
</div>
</template>

View File

@ -13,19 +13,19 @@
freqUI.
</p>
<div class="d-flex align-items-center">
<b-form-group
<BFormGroup
v-if="botStore.activeBot.backtestHistoryList.length > 0"
class="my-2"
label-for="trade-filter"
>
<b-form-input
<BFormInput
id="trade-filter"
v-model="filterText"
type="text"
placeholder="Filter Strategies"
tilte="Filter Strategies"
/>
</b-form-group>
</BFormGroup>
</div>
<BTableSimple
v-if="botStore.activeBot.backtestHistoryList.length > 0"
@ -75,7 +75,7 @@
:class="res.notes ? 'opacity-100' : 'opacity-0'"
:hint="res.notes ?? ''"
></InfoBox>
<b-button
<BButton
v-if="botStore.activeBot.botApiVersion >= 2.31"
class="ms-1"
size="sm"
@ -84,8 +84,8 @@
@click.stop="botStore.activeBot.getBacktestHistoryResult(res)"
>
<i-mdi-arrow-right />
</b-button>
<b-button
</BButton>
<BButton
v-if="botStore.activeBot.botApiVersion >= 2.31"
class="ms-1"
size="sm"
@ -94,7 +94,7 @@
@click.stop="deleteBacktestResult(res)"
>
<i-mdi-delete />
</b-button>
</BButton>
</div>
</BTd>
</BTr>

View File

@ -7,21 +7,21 @@
<div class="d-flex flex-column text-start ms-0 me-2 gap-2">
<div class="d-flex flex-column flex-xl-row">
<div class="px-0 px-xl-0 pe-xl-1 flex-fill">
<b-card header="Strategy settings">
<b-table
<BCard header="Strategy settings">
<BTable
small
borderless
:items="backtestResultSettings"
:fields="backtestsettingFields"
>
</b-table>
</b-card>
</BTable>
</BCard>
</div>
<div class="px-0 px-xl-0 pt-2 pt-xl-0 ps-xl-1 flex-fill">
<b-card header="Metrics">
<b-table small borderless :items="backtestResultStats" :fields="backtestResultFields">
</b-table>
</b-card>
<BCard header="Metrics">
<BTable small borderless :items="backtestResultStats" :fields="backtestResultFields">
</BTable>
</BCard>
</div>
</div>
<BacktestResultTablePer
@ -56,18 +56,18 @@
key-header="Pair"
:stake-currency-decimals="backtestResult.stake_currency_decimals"
/>
<b-card v-if="backtestResult.periodic_breakdown" header="Periodic breakdown">
<BCard v-if="backtestResult.periodic_breakdown" header="Periodic breakdown">
<BacktestResultPeriodBreakdown :periodic-breakdown="backtestResult.periodic_breakdown">
</BacktestResultPeriodBreakdown>
</b-card>
</BCard>
<b-card header="Single trades">
<BCard header="Single trades">
<TradeList
:trades="backtestResult.trades"
:show-filter="true"
:stake-currency="backtestResult.stake_currency"
/>
</b-card>
</BCard>
</div>
</div>
</template>

View File

@ -2,7 +2,7 @@
<div>
<div class="d-flex flex-row mb-1 align-items-center">
<div class="me-2">
<b-button
<BButton
aria-label="Close"
title="Pair Navigation"
variant="outline-secondary"
@ -11,14 +11,14 @@
>
<i-mdi-chevron-right v-if="!isBarVisible.left" width="24" height="24" />
<i-mdi-chevron-left v-if="isBarVisible.left" width="24" height="24" />
</b-button>
</BButton>
</div>
<span class="flex-fill">
Graph will always show the latest values for the selected strategy. <br />
Timerange: {{ timerange }} - {{ strategy }}
</span>
<div class="col-md-1 text-end">
<b-button
<BButton
aria-label="Close"
variant="outline-secondary"
title="Trade Navigation"
@ -27,7 +27,7 @@
>
<i-mdi-chevron-right v-if="isBarVisible.right" width="24" height="24" />
<i-mdi-chevron-left v-if="!isBarVisible.right" width="24" height="24" />
</b-button>
</BButton>
</div>
</div>
<div class="text-center d-flex flex-row h-100 align-items-stretch">
@ -64,9 +64,9 @@
/>
</Transition>
</div>
<b-card header="Single trades" class="row mt-2 w-100">
<BCard header="Single trades" class="row mt-2 w-100">
<TradeList class="row trade-history mt-2 w-100" :trades="trades" :show-filter="true" />
</b-card>
</BCard>
</div>
</template>

View File

@ -12,7 +12,7 @@
<div class="d-flex flex-column text-start ms-0 me-2 gap-2">
<div class="d-flex flex-column flex-xl-row">
<div class="px-0 px-xl-0 pt-2 pt-xl-0 ps-xl-1 flex-fill">
<b-table bordered :items="backtestResultStats" :fields="backtestResultFields">
<BTable bordered :items="backtestResultStats" :fields="backtestResultFields">
<template
v-for="[key, result] in Object.entries(backtestResults)"
#[`head(${key})`]
@ -20,7 +20,7 @@
>
<BacktestResultSelectEntry :backtest-result="result" />
</template>
</b-table>
</BTable>
</div>
</div>
</div>

View File

@ -27,7 +27,7 @@ const periodicBreakdownFields = computed<TableField[]>(() => {
</script>
<template>
<b-form-radio-group
<BFormRadioGroup
id="order-direction"
v-model="periodicBreakdownPeriod"
:options="periodicBreakdownSelections"
@ -36,13 +36,13 @@ const periodicBreakdownFields = computed<TableField[]>(() => {
buttons
style="min-width: 10em"
button-variant="outline-primary"
></b-form-radio-group>
<b-table
></BFormRadioGroup>
<BTable
small
hover
stacked="sm"
:items="periodicBreakdown[periodicBreakdownPeriod] as unknown as TableItem[]"
:fields="periodicBreakdownFields"
>
</b-table>
</BTable>
</template>

View File

@ -1,8 +1,8 @@
<template>
<div class="container d-flex flex-column align-items-stretch">
<h3>Available results:</h3>
<b-list-group class="ms-2">
<b-list-group-item
<BListGroup class="ms-2">
<BListGroupItem
v-for="[key, result] in Object.entries(backtestHistory)"
:key="key"
button
@ -13,7 +13,7 @@
<template v-if="!result.metadata.editing">
<BacktestResultSelectEntry :backtest-result="result" />
<div class="d-flex">
<b-button
<BButton
v-if="canUseModify"
class="flex-nowrap"
size="sm"
@ -21,27 +21,27 @@
@click.stop="result.metadata.editing = !result.metadata.editing"
>
<i-mdi-pencil />
</b-button>
<b-button
</BButton>
<BButton
size="sm"
class="flex-nowrap"
title="Delete this Result from UI."
@click.stop="emit('removeResult', key)"
>
<i-mdi-delete />
</b-button>
</BButton>
</div>
</template>
<template v-if="result.metadata.editing">
<b-form-textarea v-model="result.metadata.notes" placeholder="notes" size="sm">
</b-form-textarea>
<BFormTextarea v-model="result.metadata.notes" placeholder="notes" size="sm">
</BFormTextarea>
<b-button size="sm" title="Confirm" @click.stop="confirmInput(key, result)">
<BButton size="sm" title="Confirm" @click.stop="confirmInput(key, result)">
<i-mdi-check />
</b-button>
</BButton>
</template>
</b-list-group-item>
</b-list-group>
</BListGroupItem>
</BListGroup>
</div>
</template>

View File

@ -61,7 +61,7 @@ const perTagReason = computed(() => {
});
</script>
<template>
<b-card :header="title">
<b-table small hover stacked="sm" :items="tableItems" :fields="perTagReason"> </b-table>
</b-card>
<BCard :header="title">
<BTable small hover stacked="sm" :items="tableItems" :fields="perTagReason"> </BTable>
</BCard>
</template>

View File

@ -3,24 +3,24 @@
<span>Strategy</span>
<StrategySelect v-model="btStore.strategy"></StrategySelect>
</div>
<b-card :disabled="botStore.activeBot.backtestRunning">
<BCard :disabled="botStore.activeBot.backtestRunning">
<!-- Backtesting parameters -->
<b-form-group
<BFormGroup
label-cols-lg="2"
label="Backtest params"
label-size="sm"
label-class="fw-bold pt-0"
class="mb-0"
>
<b-form-group
<BFormGroup
label-cols-sm="5"
label="Timeframe:"
label-align-sm="right"
label-for="timeframe-select"
>
<TimeframeSelect id="timeframe-select" v-model="btStore.selectedTimeframe" />
</b-form-group>
<b-form-group
</BFormGroup>
<BFormGroup
label-cols-sm="5"
label="Detail Timeframe:"
label-align-sm="right"
@ -32,36 +32,36 @@
v-model="btStore.selectedDetailTimeframe"
:below-timeframe="btStore.selectedTimeframe"
/>
</b-form-group>
</BFormGroup>
<b-form-group
<BFormGroup
label-cols-sm="5"
label="Max open trades:"
label-align-sm="right"
label-for="max-open-trades"
>
<b-form-input
<BFormInput
id="max-open-trades"
v-model="btStore.maxOpenTrades"
placeholder="Use strategy default"
type="number"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
label-cols-sm="5"
label="Starting capital:"
label-align-sm="right"
label-for="starting-capital"
>
<b-form-input
<BFormInput
id="starting-capital"
v-model="btStore.startingCapital"
placeholder="Use config default"
type="number"
step="0.001"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
label-cols-sm="5"
label="Stake amount:"
label-align-sm="right"
@ -69,11 +69,11 @@
>
<div class="d-flex align-items-center">
<div style="flex-basis: 100%" class="d-flex">
<b-form-checkbox id="stake-amount-bool" v-model="btStore.stakeAmountUnlimited"
>Unlimited stake</b-form-checkbox
<BFormCheckbox id="stake-amount-bool" v-model="btStore.stakeAmountUnlimited"
>Unlimited stake</BFormCheckbox
>
</div>
<b-form-input
<BFormInput
id="stake-amount"
v-model="btStore.stakeAmount"
type="number"
@ -81,23 +81,20 @@
step="0.01"
style="flex-basis: 100%"
:disabled="btStore.stakeAmountUnlimited"
></b-form-input>
></BFormInput>
</div>
</b-form-group>
</BFormGroup>
<b-form-group
<BFormGroup
label-cols-sm="5"
label="Enable Protections:"
label-align-sm="right"
label-for="enable-protections"
class="align-items-center"
>
<b-form-checkbox
id="enable-protections"
v-model="btStore.enableProtections"
></b-form-checkbox>
</b-form-group>
<b-form-group
<BFormCheckbox id="enable-protections" v-model="btStore.enableProtections"></BFormCheckbox>
</BFormGroup>
<BFormGroup
v-if="botStore.activeBot.botApiVersion >= 2.22"
label-cols-sm="5"
label="Cache Backtest results:"
@ -105,10 +102,10 @@
label-for="enable-cache"
class="align-items-center"
>
<b-form-checkbox id="enable-cache" v-model="btStore.allowCache"></b-form-checkbox>
</b-form-group>
<BFormCheckbox id="enable-cache" v-model="btStore.allowCache"></BFormCheckbox>
</BFormGroup>
<template v-if="botStore.activeBot.botApiVersion >= 2.22">
<b-form-group
<BFormGroup
label-cols-sm="5"
label="Enable FreqAI:"
label-align-sm="right"
@ -123,22 +120,22 @@
/>
</div>
</template>
<b-form-checkbox id="enable-freqai" v-model="btStore.freqAI.enabled"></b-form-checkbox>
</b-form-group>
<b-form-group
<BFormCheckbox id="enable-freqai" v-model="btStore.freqAI.enabled"></BFormCheckbox>
</BFormGroup>
<BFormGroup
v-if="btStore.freqAI.enabled"
label-cols-sm="5"
label="FreqAI identifier:"
label-align-sm="right"
label-for="freqai-identifier"
>
<b-form-input
<BFormInput
id="freqai-identifier"
v-model="btStore.freqAI.identifier"
placeholder="Use config default"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
v-if="btStore.freqAI.enabled"
label-cols-sm="5"
label="FreqAI Model"
@ -146,7 +143,7 @@
label-for="freqai-model"
>
<FreqaiModelSelect id="freqai-model" v-model="btStore.freqAI.model"></FreqaiModelSelect>
</b-form-group>
</BFormGroup>
</template>
<!-- <b-form-group label-cols-sm="5" label="Fee:" label-align-sm="right" label-for="fee">
@ -159,12 +156,12 @@
</b-form-group> -->
<hr />
<TimeRangeSelect v-model="btStore.timerange" class="mt-2"></TimeRangeSelect>
</b-form-group>
</b-card>
</BFormGroup>
</BCard>
<h3 class="mt-3">Backtesting summary</h3>
<div class="d-flex flex-wrap flex-md-nowrap justify-content-between justify-content-md-center">
<b-button
<BButton
id="start-backtest"
variant="primary"
:disabled="
@ -176,28 +173,28 @@
@click="clickBacktest"
>
Start backtest
</b-button>
<b-button
</BButton>
<BButton
variant="secondary"
:disabled="botStore.activeBot.backtestRunning || !botStore.activeBot.canRunBacktest"
class="mx-1"
@click="botStore.activeBot.pollBacktest"
>
Load backtest result
</b-button>
<b-button
</BButton>
<BButton
variant="secondary"
class="mx-1"
:disabled="!botStore.activeBot.backtestRunning"
@click="botStore.activeBot.stopBacktest"
>Stop Backtest</b-button
>Stop Backtest</BButton
>
<b-button
<BButton
variant="secondary"
class="mx-1"
:disabled="botStore.activeBot.backtestRunning || !botStore.activeBot.canRunBacktest"
@click="botStore.activeBot.removeBacktest"
>Reset Backtest</b-button
>Reset Backtest</BButton
>
</div>
</template>

View File

@ -3,7 +3,7 @@
<div class="mb-2">
<label class="me-auto h3">Balance</label>
<div class="float-end d-flex flex-row">
<b-button
<BButton
v-if="canUseBotBalance"
size="sm"
:title="!showBotOnly ? 'Showing Account balance' : 'Showing Bot balance'"
@ -11,19 +11,19 @@
>
<i-mdi-robot v-if="showBotOnly" />
<i-mdi-bank v-else />
</b-button>
<b-button
</BButton>
<BButton
size="sm"
:title="!hideSmallBalances ? 'Hide small balances' : 'Show all balances'"
@click="hideSmallBalances = !hideSmallBalances"
>
<i-mdi-eye-off v-if="hideSmallBalances" />
<i-mdi-eye v-else />
</b-button>
</BButton>
<b-button class="float-end" size="sm" @click="refreshBalance">
<BButton class="float-end" size="sm" @click="refreshBalance">
<i-mdi-refresh />
</b-button>
</BButton>
</div>
</div>
<BalanceChart v-if="balanceCurrencies" :currencies="chartValues" />
@ -31,7 +31,7 @@
<p v-if="botStore.activeBot.balance.note">
<strong>{{ botStore.activeBot.balance.note }}</strong>
</p>
<b-table class="table-sm" :items="balanceCurrencies" :fields="tableFields">
<BTable class="table-sm" :items="balanceCurrencies" :fields="tableFields">
<template #custom-foot>
<td class="pt-1"><strong>Total</strong></td>
<td class="pt-1">
@ -55,7 +55,7 @@
</strong>
</td>
</template>
</b-table>
</BTable>
</div>
</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<b-table
<BTable
ref="tradesTable"
small
hover
@ -10,19 +10,19 @@
>
<template #cell(botName)="{ item, value }">
<div class="d-flex flex-row">
<b-form-checkbox
<BFormCheckbox
v-if="item.botId && botStore.botCount > 1"
v-model="
botStore.botStores[(item as unknown as ComparisonTableItems).botId ?? ''].isSelected
"
title="Show this bot in Dashboard"
>{{ value }}</b-form-checkbox
>{{ value }}</BFormCheckbox
>
<b-form-checkbox
<BFormCheckbox
v-if="!item.botId && botStore.botCount > 1"
v-model="allToggled"
title="Toggle all bots"
>{{ value }}</b-form-checkbox
>{{ value }}</BFormCheckbox
>
<span v-if="botStore.botCount <= 1">{{ value }}</span>
</div>
@ -68,7 +68,7 @@
<span class="text-loss">{{ item.losses }}</span>
</div>
</template>
</b-table>
</BTable>
</template>
<script setup lang="ts">

View File

@ -100,11 +100,11 @@ onMounted(() => {
<div>
<div class="mb-2">
<h3 class="me-auto d-inline">Performance</h3>
<b-button class="float-end" size="sm" @click="refreshSummary">
<BButton class="float-end" size="sm" @click="refreshSummary">
<i-mdi-refresh />
</b-button>
</BButton>
</div>
<b-form-radio-group
<BFormRadioGroup
v-if="hasAdvancedStats"
id="order-direction"
v-model="selectedOption"
@ -115,7 +115,7 @@ onMounted(() => {
style="min-width: 10em"
button-variant="outline-primary"
@change="refreshSummary"
></b-form-radio-group>
<b-table class="table-sm" :items="performanceData" :fields="performanceTable"></b-table>
></BFormRadioGroup>
<BTable class="table-sm" :items="performanceData" :fields="performanceTable"></BTable>
</div>
</template>

View File

@ -1,10 +1,10 @@
<template>
<b-table class="text-start" small borderless :items="profitItems" :fields="profitFields">
<BTable class="text-start" small borderless :items="profitItems" :fields="profitFields">
<template #cell(value)="row">
<DateTimeTZ v-if="row.item.isTs && row.value" :date="row.value as number"></DateTimeTZ>
<template v-else>{{ row.value }}</template>
</template>
</b-table>
</BTable>
</template>
<script setup lang="ts">

View File

@ -1,27 +1,27 @@
<template>
<div class="h-100 overflow-auto p-1">
<b-list-group id="tradeList">
<b-list-group-item
<BListGroup id="tradeList">
<BListGroupItem
v-for="trade in filteredTrades"
:key="trade.trade_id"
class="border border-secondary rounded my-05 px-1"
@click="tradeClick(trade)"
>
<CustomTradeListEntry :trade="trade" :stake-currency-decimals="stakeCurrencyDecimals" />
</b-list-group-item>
</b-list-group>
</BListGroupItem>
</BListGroup>
<span v-if="trades.length == 0" class="mt-5">{{ emptyText }}</span>
<div class="w-100 d-flex justify-content-between mt-1">
<b-pagination
<BPagination
v-if="!activeTrades"
v-model="currentPage"
:total-rows="rows"
:per-page="perPage"
aria-controls="tradeList"
></b-pagination>
<b-form-input
></BPagination>
<BFormInput
v-if="showFilter"
v-model="filterText"
type="text"

View File

@ -1,23 +1,23 @@
<template>
<div class="w-100 d-flex">
<b-form-select
<BFormSelect
id="exchange-select"
v-model="exchangeModel.exchange"
size="sm"
:options="exchangeList"
>
</b-form-select>
<b-form-select
</BFormSelect>
<BFormSelect
id="tradeMode-select"
v-model="exchangeModel.trade_mode"
size="sm"
:options="tradeModes"
:disabled="tradeModes.length < 2"
>
</b-form-select>
<b-button class="ms-2 no-min-w" size="sm" @click="botStore.activeBot.getExchangeList">
</BFormSelect>
<BButton class="ms-2 no-min-w" size="sm" @click="botStore.activeBot.getExchangeList">
<i-mdi-refresh />
</b-button>
</BButton>
</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<b-modal
<BModal
id="forceentry-modal"
ref="modal"
v-model="model"
@ -9,14 +9,14 @@
@ok="handleEntry"
>
<form ref="form" @submit.stop.prevent="handleSubmit">
<b-form-group
<BFormGroup
v-if="botStore.activeBot.botApiVersion >= 2.13 && botStore.activeBot.shortAllowed"
label="Order direction (Long or Short)"
label-for="order-direction"
invalid-feedback="Order direction must be set"
:state="orderSide !== undefined"
>
<b-form-radio-group
<BFormRadioGroup
id="order-direction"
v-model="orderSide"
:options="orderSideOptions"
@ -25,73 +25,73 @@
buttons
style="min-width: 10em"
button-variant="outline-primary"
></b-form-radio-group>
</b-form-group>
<b-form-group
></BFormRadioGroup>
</BFormGroup>
<BFormGroup
label="Pair"
label-for="pair-input"
invalid-feedback="Pair is required"
:state="selectedPair !== undefined"
>
<b-form-input
<BFormInput
id="pair-input"
v-model="selectedPair"
required
:disabled="positionIncrease"
@keydown.enter="handleEntry"
@focus="inputSelect"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
label="*Price [optional]"
label-for="price-input"
invalid-feedback="Price must be empty or a positive number"
:state="!price || price > 0"
>
<b-form-input
<BFormInput
id="price-input"
v-model="price"
type="number"
step="0.00000001"
@keydown.enter="handleEntry"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
:label="`*Stake-amount in ${botStore.activeBot.stakeCurrency} [optional]`"
label-for="stake-input"
invalid-feedback="Stake-amount must be empty or a positive number"
:state="!stakeAmount || stakeAmount > 0"
>
<b-form-input
<BFormInput
id="stake-input"
v-model="stakeAmount"
type="number"
step="0.000001"
@keydown.enter="handleEntry"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
v-if="botStore.activeBot.botApiVersion > 2.16 && botStore.activeBot.shortAllowed"
:label="`*Leverage to apply [optional]`"
label-for="leverage-input"
invalid-feedback="Leverage must be empty or a positive number"
:state="!leverage || leverage > 0"
>
<b-form-input
<BFormInput
id="leverage-input"
v-model="leverage"
type="number"
step="0.01"
@keydown.enter="handleEntry"
></b-form-input>
</b-form-group>
<b-form-group
></BFormInput>
</BFormGroup>
<BFormGroup
label="OrderType"
label-for="ordertype-input"
invalid-feedback="OrderType"
:state="true"
>
<b-form-radio-group
<BFormRadioGroup
id="ordertype-input"
v-model="ordertype"
:options="orderTypeOptions"
@ -100,22 +100,22 @@
button-variant="outline-primary"
style="min-width: 10em"
size="sm"
></b-form-radio-group>
</b-form-group>
<b-form-group
></BFormRadioGroup>
</BFormGroup>
<BFormGroup
v-if="botStore.activeBot.botApiVersion > 1.16"
label="*Custom entry tag Optional]"
label-for="enterTag-input"
>
<b-form-input
<BFormInput
id="enterTag-input"
v-model="enterTag"
type="text"
name="radios-btn-orderType"
></b-form-input>
</b-form-group>
></BFormInput>
</BFormGroup>
</form>
</b-modal>
</BModal>
</template>
<script setup lang="ts">

View File

@ -1,6 +1,6 @@
<template>
<div>
<b-modal
<BModal
id="forceexit-modal"
v-model="model"
title="Force exiting a trade"
@ -14,45 +14,40 @@
<br />
<span>Currently owning {{ trade.amount }} {{ trade.base_currency }}</span>
</p>
<b-form-group
<BFormGroup
:label="`*Amount in ${trade.base_currency} [optional]`"
label-for="stake-input"
invalid-feedback="Amount must be empty or a positive number"
:state="amount !== undefined && amount > 0"
>
<b-form-input
id="stake-input"
v-model="amount"
type="number"
step="0.000001"
></b-form-input>
<b-form-input
<BFormInput id="stake-input" v-model="amount" type="number" step="0.000001"></BFormInput>
<BFormInput
id="stake-input"
v-model="amount"
type="range"
step="0.000001"
min="0"
:max="trade.amount"
></b-form-input>
</b-form-group>
></BFormInput>
</BFormGroup>
<b-form-group
<BFormGroup
label="*OrderType"
label-for="ordertype-input"
invalid-feedback="OrderType"
:state="ordertype !== undefined"
>
<b-form-select
<BFormSelect
v-model="ordertype"
class="ms-2"
:options="['market', 'limit']"
style="min-width: 7em"
size="sm"
>
</b-form-select>
</b-form-group>
</BFormSelect>
</BFormGroup>
</form>
</b-modal>
</BModal>
</div>
</template>

View File

@ -1,16 +1,16 @@
<template>
<div>
<div class="w-100 d-flex">
<b-form-select
<BFormSelect
id="freqaiModel-select"
v-model="locFreqaiModel"
:options="botStore.activeBot.freqaiModelList"
>
</b-form-select>
</BFormSelect>
<div class="ms-2">
<b-button @click="botStore.activeBot.getFreqAIModelList">
<BButton @click="botStore.activeBot.getFreqAIModelList">
<i-mdi-refresh />
</b-button>
</BButton>
</div>
</div>
</div>

View File

@ -10,12 +10,12 @@
></pre>
</div>
<div class="d-flex flex-column gap-1 ms-1">
<b-button id="refresh-logs" size="sm" title="Reload Logs" @click="refreshLogs">
<BButton id="refresh-logs" size="sm" title="Reload Logs" @click="refreshLogs">
<i-mdi-refresh />
</b-button>
<b-button size="sm" title="Scroll to bottom" @click="scrollToBottom">
</BButton>
<BButton size="sm" title="Scroll to bottom" @click="scrollToBottom">
<i-mdi-arrow-down-thick />
</b-button>
</BButton>
</div>
</div>
</template>

View File

@ -1,13 +1,13 @@
<template>
<div class="d-flex flex-column flex-sm-row mb-2 gap-2">
<b-button
<BButton
title="Save configuration"
size="sm"
variant="primary"
@click="pairlistStore.saveConfig(pairlistStore.config.name)"
>
<i-mdi-content-save />
</b-button>
</BButton>
<EditValue
v-model="pairlistStore.config.name"
editable-name="config"
@ -20,14 +20,14 @@
@new="(name: string) => pairlistStore.newConfig(name)"
@rename="(oldName: string, newName: string) => pairlistStore.saveConfig(newName)"
>
<b-form-select
<BFormSelect
v-model="pairlistStore.configName"
size="sm"
:options="pairlistStore.savedConfigs.map((c) => c.name)"
@update:model-value="(config) => pairlistStore.selectOrCreateConfig(config as string)"
/>
</EditValue>
<b-button
<BButton
title="Evaluate pairlist"
:disabled="pairlistStore.evaluating || !pairlistStore.pairlistValid"
variant="primary"
@ -35,9 +35,9 @@
size="sm"
@click="pairlistStore.startPairlistEvaluation()"
>
<b-spinner v-if="pairlistStore.evaluating" small></b-spinner>
<BSpinner v-if="pairlistStore.evaluating" small></BSpinner>
<span>{{ pairlistStore.evaluating ? '' : 'Evaluate' }}</span>
</b-button>
</BButton>
</div>
</template>
<script setup lang="ts">

View File

@ -1,5 +1,5 @@
<template>
<b-card no-body class="mb-2">
<BCard no-body class="mb-2">
<template #header>
<div
class="d-flex flex-row align-items-center justify-content-between"
@ -21,32 +21,32 @@
/>
</div>
</template>
<b-collapse v-model="visible">
<b-card-body>
<BCollapse v-model="visible">
<BCardBody>
<div class="d-flex mb-4 align-items-center gap-2">
<span class="col-auto">Copy from:</span
><b-form-select v-model="copyFromConfig" size="sm" :options="configNames" />
<b-button title="Copy" size="sm" @click="pairlistStore.duplicateBlacklist(copyFromConfig)"
><BFormSelect v-model="copyFromConfig" size="sm" :options="configNames" />
<BButton title="Copy" size="sm" @click="pairlistStore.duplicateBlacklist(copyFromConfig)"
><i-mdi-content-copy
/></b-button>
/></BButton>
</div>
<b-input-group
<BInputGroup
v-for="(item, i) in pairlistStore.config.blacklist"
:key="i"
class="mb-2"
size="sm"
>
<b-form-input v-model="pairlistStore.config.blacklist[i]" />
<BFormInput v-model="pairlistStore.config.blacklist[i]" />
<template #append>
<b-button size="sm" @click="pairlistStore.removeFromBlacklist(i)"
<BButton size="sm" @click="pairlistStore.removeFromBlacklist(i)"
><i-mdi-close
/></b-button>
/></BButton>
</template>
</b-input-group>
<b-button size="sm" @click="pairlistStore.addToBlacklist()">Add</b-button>
</b-card-body>
</b-collapse>
</b-card>
</BInputGroup>
<BButton size="sm" @click="pairlistStore.addToBlacklist()">Add</BButton>
</BCardBody>
</BCollapse>
</BCard>
</template>
<script setup lang="ts">
import { usePairlistConfigStore } from '@/stores/pairlistConfig';

View File

@ -1,5 +1,5 @@
<template>
<b-card no-body class="mb-2">
<BCard no-body class="mb-2">
<template #header>
<div class="d-flex text-start align-items-center">
<div class="d-flex flex-grow-1 align-items-center">
@ -41,17 +41,17 @@
/>
</div>
</template>
<b-collapse v-model="pairlist.showParameters">
<b-card-body>
<BCollapse v-model="pairlist.showParameters">
<BCardBody>
<PairlistConfigParameter
v-for="(parameter, key) in pairlist.params"
:key="key"
v-model="pairlist.params[key].value"
:param="parameter"
/>
</b-card-body>
</b-collapse>
</b-card>
</BCardBody>
</BCollapse>
</BCard>
</template>
<script setup lang="ts">