mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Fix bug where opening chart directly fails
This commit is contained in:
parent
86cee7161d
commit
381cc67c0d
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
<transition name="fade" mode="in-out">
|
||||
<div v-if="!plotConfigModal" v-show="showPlotConfig" class="w-25 config-sidebar">
|
||||
<PlotConfigurator :columns="datasetColumns" :as-modal="false" />
|
||||
<PlotConfigurator :columns="datasetColumns" :is-visible="showPlotConfig ?? false" />
|
||||
</div>
|
||||
</transition>
|
||||
<b-modal
|
||||
|
@ -83,7 +83,7 @@
|
|||
ok-only
|
||||
hide-backdrop
|
||||
>
|
||||
<PlotConfigurator v-if="showPlotConfigModal" :columns="datasetColumns" />
|
||||
<PlotConfigurator :is-visible="showPlotConfigModal" :columns="datasetColumns" />
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -166,12 +166,12 @@ import PlotIndicatorSelect from './PlotIndicatorSelect.vue';
|
|||
import { deepClone } from '@/shared/deepClone';
|
||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||
import { usePlotConfigStore } from '@/stores/plotConfig';
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import randomColor from '@/shared/randomColor';
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
columns: { required: true, type: Array as () => string[] },
|
||||
asModal: { required: false, default: true, type: Boolean },
|
||||
isVisible: { required: true, default: false, type: Boolean },
|
||||
});
|
||||
|
||||
const plotStore = usePlotConfigStore();
|
||||
|
@ -360,16 +360,19 @@ watch(
|
|||
},
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
// Deep clone and assign to editable
|
||||
plotStore.editablePlotConfig = deepClone(plotStore.plotConfig);
|
||||
plotStore.isEditing = true;
|
||||
plotConfigNameLoc.value = plotStore.plotConfigName;
|
||||
});
|
||||
onUnmounted(() => {
|
||||
// TODO: Unmounted is not called when closing in Chart view
|
||||
plotStore.isEditing = false;
|
||||
});
|
||||
watch(
|
||||
() => props.isVisible,
|
||||
() => {
|
||||
if (props.isVisible) {
|
||||
// Deep clone and assign to editable
|
||||
plotStore.editablePlotConfig = deepClone(plotStore.plotConfig);
|
||||
plotStore.isEditing = true;
|
||||
plotConfigNameLoc.value = plotStore.plotConfigName;
|
||||
} else {
|
||||
plotStore.isEditing = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
Loading…
Reference in New Issue
Block a user