diff --git a/src/components/ftbot/PlotConfigurator.vue b/src/components/ftbot/PlotConfigurator.vue index 5ec981de..8c840799 100644 --- a/src/components/ftbot/PlotConfigurator.vue +++ b/src/components/ftbot/PlotConfigurator.vue @@ -195,6 +195,8 @@ export default class PlotConfigurator extends Vue { @ftbot.Mutation updatePlotConfigName!: (plotConfigName: string) => void; + @ftbot.State('plotConfigName') usedPlotConfigName!: string; + get plotConfigJson() { return JSON.stringify(this.plotConfig, null, 2); } @@ -230,6 +232,7 @@ export default class PlotConfigurator extends Vue { mounted() { this.plotConfig = this.value; + this.plotConfigName = this.usedPlotConfigName; } newColor() { diff --git a/src/shared/storage.ts b/src/shared/storage.ts index 52dfb310..f5e6ef09 100644 --- a/src/shared/storage.ts +++ b/src/shared/storage.ts @@ -4,7 +4,7 @@ const PLOT_CONFIG = 'ft_custom_plot_config'; const PLOT_CONFIG_NAME = 'ft_selected_plot_config'; export function loadPlotConfigName(): string { - return localStorage.getItem(PLOT_CONFIG_NAME) || ''; + return localStorage.getItem(PLOT_CONFIG_NAME) || 'default'; } export function storePlotConfigName(plotConfigName: string): void {