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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
<template> <template>
<form class="d-flex" @submit.prevent="save"> <form class="d-flex" @submit.prevent="save">
<b-form-input <BFormInput
v-model="newName" v-model="newName"
size="sm" size="sm"
class="w-100" class="w-100"
@ -10,13 +10,13 @@
/> />
<div class="d-flex ms-2 no-min-w"> <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 /> <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 /> <i-mdi-close />
</b-button> </BButton>
</div> </div>
</form> </form>
</template> </template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,19 +13,19 @@
freqUI. freqUI.
</p> </p>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<b-form-group <BFormGroup
v-if="botStore.activeBot.backtestHistoryList.length > 0" v-if="botStore.activeBot.backtestHistoryList.length > 0"
class="my-2" class="my-2"
label-for="trade-filter" label-for="trade-filter"
> >
<b-form-input <BFormInput
id="trade-filter" id="trade-filter"
v-model="filterText" v-model="filterText"
type="text" type="text"
placeholder="Filter Strategies" placeholder="Filter Strategies"
tilte="Filter Strategies" tilte="Filter Strategies"
/> />
</b-form-group> </BFormGroup>
</div> </div>
<BTableSimple <BTableSimple
v-if="botStore.activeBot.backtestHistoryList.length > 0" v-if="botStore.activeBot.backtestHistoryList.length > 0"
@ -75,7 +75,7 @@
:class="res.notes ? 'opacity-100' : 'opacity-0'" :class="res.notes ? 'opacity-100' : 'opacity-0'"
:hint="res.notes ?? ''" :hint="res.notes ?? ''"
></InfoBox> ></InfoBox>
<b-button <BButton
v-if="botStore.activeBot.botApiVersion >= 2.31" v-if="botStore.activeBot.botApiVersion >= 2.31"
class="ms-1" class="ms-1"
size="sm" size="sm"
@ -84,8 +84,8 @@
@click.stop="botStore.activeBot.getBacktestHistoryResult(res)" @click.stop="botStore.activeBot.getBacktestHistoryResult(res)"
> >
<i-mdi-arrow-right /> <i-mdi-arrow-right />
</b-button> </BButton>
<b-button <BButton
v-if="botStore.activeBot.botApiVersion >= 2.31" v-if="botStore.activeBot.botApiVersion >= 2.31"
class="ms-1" class="ms-1"
size="sm" size="sm"
@ -94,7 +94,7 @@
@click.stop="deleteBacktestResult(res)" @click.stop="deleteBacktestResult(res)"
> >
<i-mdi-delete /> <i-mdi-delete />
</b-button> </BButton>
</div> </div>
</BTd> </BTd>
</BTr> </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 text-start ms-0 me-2 gap-2">
<div class="d-flex flex-column flex-xl-row"> <div class="d-flex flex-column flex-xl-row">
<div class="px-0 px-xl-0 pe-xl-1 flex-fill"> <div class="px-0 px-xl-0 pe-xl-1 flex-fill">
<b-card header="Strategy settings"> <BCard header="Strategy settings">
<b-table <BTable
small small
borderless borderless
:items="backtestResultSettings" :items="backtestResultSettings"
:fields="backtestsettingFields" :fields="backtestsettingFields"
> >
</b-table> </BTable>
</b-card> </BCard>
</div> </div>
<div class="px-0 px-xl-0 pt-2 pt-xl-0 ps-xl-1 flex-fill"> <div class="px-0 px-xl-0 pt-2 pt-xl-0 ps-xl-1 flex-fill">
<b-card header="Metrics"> <BCard header="Metrics">
<b-table small borderless :items="backtestResultStats" :fields="backtestResultFields"> <BTable small borderless :items="backtestResultStats" :fields="backtestResultFields">
</b-table> </BTable>
</b-card> </BCard>
</div> </div>
</div> </div>
<BacktestResultTablePer <BacktestResultTablePer
@ -56,18 +56,18 @@
key-header="Pair" key-header="Pair"
:stake-currency-decimals="backtestResult.stake_currency_decimals" :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 :periodic-breakdown="backtestResult.periodic_breakdown">
</BacktestResultPeriodBreakdown> </BacktestResultPeriodBreakdown>
</b-card> </BCard>
<b-card header="Single trades"> <BCard header="Single trades">
<TradeList <TradeList
:trades="backtestResult.trades" :trades="backtestResult.trades"
:show-filter="true" :show-filter="true"
:stake-currency="backtestResult.stake_currency" :stake-currency="backtestResult.stake_currency"
/> />
</b-card> </BCard>
</div> </div>
</div> </div>
</template> </template>

View File

@ -2,7 +2,7 @@
<div> <div>
<div class="d-flex flex-row mb-1 align-items-center"> <div class="d-flex flex-row mb-1 align-items-center">
<div class="me-2"> <div class="me-2">
<b-button <BButton
aria-label="Close" aria-label="Close"
title="Pair Navigation" title="Pair Navigation"
variant="outline-secondary" variant="outline-secondary"
@ -11,14 +11,14 @@
> >
<i-mdi-chevron-right v-if="!isBarVisible.left" width="24" height="24" /> <i-mdi-chevron-right v-if="!isBarVisible.left" width="24" height="24" />
<i-mdi-chevron-left v-if="isBarVisible.left" width="24" height="24" /> <i-mdi-chevron-left v-if="isBarVisible.left" width="24" height="24" />
</b-button> </BButton>
</div> </div>
<span class="flex-fill"> <span class="flex-fill">
Graph will always show the latest values for the selected strategy. <br /> Graph will always show the latest values for the selected strategy. <br />
Timerange: {{ timerange }} - {{ strategy }} Timerange: {{ timerange }} - {{ strategy }}
</span> </span>
<div class="col-md-1 text-end"> <div class="col-md-1 text-end">
<b-button <BButton
aria-label="Close" aria-label="Close"
variant="outline-secondary" variant="outline-secondary"
title="Trade Navigation" title="Trade Navigation"
@ -27,7 +27,7 @@
> >
<i-mdi-chevron-right v-if="isBarVisible.right" width="24" height="24" /> <i-mdi-chevron-right v-if="isBarVisible.right" width="24" height="24" />
<i-mdi-chevron-left 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> </div>
<div class="text-center d-flex flex-row h-100 align-items-stretch"> <div class="text-center d-flex flex-row h-100 align-items-stretch">
@ -64,9 +64,9 @@
/> />
</Transition> </Transition>
</div> </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" /> <TradeList class="row trade-history mt-2 w-100" :trades="trades" :show-filter="true" />
</b-card> </BCard>
</div> </div>
</template> </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 text-start ms-0 me-2 gap-2">
<div class="d-flex flex-column flex-xl-row"> <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"> <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 <template
v-for="[key, result] in Object.entries(backtestResults)" v-for="[key, result] in Object.entries(backtestResults)"
#[`head(${key})`] #[`head(${key})`]
@ -20,7 +20,7 @@
> >
<BacktestResultSelectEntry :backtest-result="result" /> <BacktestResultSelectEntry :backtest-result="result" />
</template> </template>
</b-table> </BTable>
</div> </div>
</div> </div>
</div> </div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,10 @@
<template> <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"> <template #cell(value)="row">
<DateTimeTZ v-if="row.item.isTs && row.value" :date="row.value as number"></DateTimeTZ> <DateTimeTZ v-if="row.item.isTs && row.value" :date="row.value as number"></DateTimeTZ>
<template v-else>{{ row.value }}</template> <template v-else>{{ row.value }}</template>
</template> </template>
</b-table> </BTable>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,12 +10,12 @@
></pre> ></pre>
</div> </div>
<div class="d-flex flex-column gap-1 ms-1"> <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 /> <i-mdi-refresh />
</b-button> </BButton>
<b-button size="sm" title="Scroll to bottom" @click="scrollToBottom"> <BButton size="sm" title="Scroll to bottom" @click="scrollToBottom">
<i-mdi-arrow-down-thick /> <i-mdi-arrow-down-thick />
</b-button> </BButton>
</div> </div>
</div> </div>
</template> </template>

View File

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

View File

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

View File

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