mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-14 04:03:51 +00:00
Improve plotconfig add / remove behavior
This commit is contained in:
parent
1c71ed5805
commit
dc85902350
|
@ -48,6 +48,10 @@ export const usePlotConfigStore = defineStore('plotConfig', {
|
||||||
},
|
},
|
||||||
deletePlotConfig(plotConfigName: string) {
|
deletePlotConfig(plotConfigName: string) {
|
||||||
delete this.customPlotConfigs[plotConfigName];
|
delete this.customPlotConfigs[plotConfigName];
|
||||||
|
if (this.plotConfigName === plotConfigName) {
|
||||||
|
this.plotConfigName =
|
||||||
|
this.availablePlotConfigNames[this.availablePlotConfigNames.length - 1];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
renamePlotConfig(oldName: string, newName: string) {
|
renamePlotConfig(oldName: string, newName: string) {
|
||||||
this.customPlotConfigs[newName] = this.customPlotConfigs[oldName];
|
this.customPlotConfigs[newName] = this.customPlotConfigs[oldName];
|
||||||
|
@ -56,6 +60,7 @@ export const usePlotConfigStore = defineStore('plotConfig', {
|
||||||
},
|
},
|
||||||
newPlotConfig(plotConfigName: string) {
|
newPlotConfig(plotConfigName: string) {
|
||||||
this.editablePlotConfig = deepClone(EMPTY_PLOTCONFIG);
|
this.editablePlotConfig = deepClone(EMPTY_PLOTCONFIG);
|
||||||
|
this.saveCustomPlotConfig(plotConfigName, this.editablePlotConfig);
|
||||||
this.plotConfigName = plotConfigName;
|
this.plotConfigName = plotConfigName;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user