mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 21:15:15 +00:00
Disable load_from_strateegy button when bot is offline or in webserver mode
This commit is contained in:
parent
89de68f334
commit
0c0399579e
|
@ -65,7 +65,13 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<b-button class="ms-1" variant="secondary" size="sm" @click="loadPlotConfig">Load</b-button>
|
<b-button class="ms-1" variant="secondary" size="sm" @click="loadPlotConfig">Load</b-button>
|
||||||
<b-button class="ms-1" variant="secondary" size="sm" @click="loadPlotConfigFromStrategy">
|
<b-button
|
||||||
|
:disabled="botStore.activeBot.isWebserverMode || !botStore.activeBot.isBotOnline"
|
||||||
|
class="ms-1"
|
||||||
|
variant="secondary"
|
||||||
|
size="sm"
|
||||||
|
@click="loadPlotConfigFromStrategy"
|
||||||
|
>
|
||||||
From strategy
|
From strategy
|
||||||
</b-button>
|
</b-button>
|
||||||
|
|
||||||
|
@ -135,6 +141,7 @@ defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const plotStore = usePlotConfigStore();
|
const plotStore = usePlotConfigStore();
|
||||||
|
const botStore = useBotStore();
|
||||||
|
|
||||||
const plotConfig = ref<PlotConfig>(EMPTY_PLOTCONFIG);
|
const plotConfig = ref<PlotConfig>(EMPTY_PLOTCONFIG);
|
||||||
|
|
||||||
|
@ -284,7 +291,6 @@ const resetConfig = () => {
|
||||||
};
|
};
|
||||||
const loadPlotConfigFromStrategy = async () => {
|
const loadPlotConfigFromStrategy = async () => {
|
||||||
try {
|
try {
|
||||||
const botStore = useBotStore();
|
|
||||||
await botStore.activeBot.getStrategyPlotConfig();
|
await botStore.activeBot.getStrategyPlotConfig();
|
||||||
if (botStore.activeBot.strategyPlotConfig) {
|
if (botStore.activeBot.strategyPlotConfig) {
|
||||||
plotConfig.value = botStore.activeBot.strategyPlotConfig;
|
plotConfig.value = botStore.activeBot.strategyPlotConfig;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user