fix plot modal

This commit is contained in:
Matthias 2022-11-20 08:36:46 +01:00
parent da67aec11d
commit df3b89c461
2 changed files with 21 additions and 15 deletions

View File

@ -25,7 +25,13 @@
</b-button>
</div>
</div>
<b-modal v-model="botRemoveModalVisible" title="Logout confirmation" @ok="confirmRemoveBot">
<b-modal
v-if="!noButtons"
id="removeBotModal"
v-model="botRemoveModalVisible"
title="Logout confirmation"
@ok="confirmRemoveBot"
>
Really remove (logout) from {{ bot.botName }} ({{ bot.botId }})?
</b-modal>
</div>

View File

@ -1,17 +1,6 @@
<template>
<div class="d-flex h-100">
<div class="flex-fill flex-column align-items-stretch d-flex h-100">
<b-modal
v-if="plotConfigModal"
id="plotConfiguratorModal"
title="Plot Configurator"
ok-only
hide-backdrop
button-size="sm"
>
<PlotConfigurator :columns="datasetColumns" />
</b-modal>
<div class="d-flex me-0">
<div class="ms-2 d-flex flex-wrap flex-md-nowrap align-items-center w-auto">
<span class="ms-2 text-nowrap">{{ strategyName }} | {{ timeframe || '' }}</span>
@ -56,6 +45,7 @@
</div>
<div class="ms-2 me-0 me-md-1">
{{ showPlotConfigModal }}
<b-button size="sm" title="Plot configurator" @click="showConfigurator">
&#9881;
</b-button>
@ -88,6 +78,16 @@
<PlotConfigurator :columns="datasetColumns" :as-modal="false" />
</div>
</transition>
<b-modal
v-if="plotConfigModal"
id="plotConfiguratorModal"
v-model="showPlotConfigModal"
title="Plot Configurator"
ok-only
hide-backdrop
>
<PlotConfigurator :columns="datasetColumns" />
</b-modal>
</div>
</template>
@ -122,7 +122,6 @@ export default defineComponent({
},
},
setup(props) {
const root = getCurrentInstance();
const settingsStore = useSettingsStore();
const botStore = useBotStore();
const plotStore = usePlotConfigStore();
@ -165,10 +164,10 @@ export default defineComponent({
return 'Unknown';
}
});
const showPlotConfigModal = ref(false);
const showConfigurator = () => {
if (props.plotConfigModal) {
root?.proxy.$bvModal.show('plotConfiguratorModal');
showPlotConfigModal.value = !showPlotConfigModal.value;
} else {
showPlotConfig.value = !showPlotConfig.value;
}
@ -239,6 +238,7 @@ export default defineComponent({
showConfigurator,
refresh,
pair,
showPlotConfigModal,
};
},
});