From 154e9fed3d5a6f94320fd5d81b7c9536c2bac2d5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 8 Aug 2020 15:25:58 +0200 Subject: [PATCH] Use correct default name --- src/components/ftbot/PlotConfigurator.vue | 3 +++ src/shared/storage.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 {