From 26d4c9f0edccb6d0cc5f54c267a6a8a4b6ca8334 Mon Sep 17 00:00:00 2001 From: josc146 Date: Tue, 7 Nov 2023 22:28:13 +0800 Subject: [PATCH] chore --- frontend/src/stores/commonStore.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/stores/commonStore.ts b/frontend/src/stores/commonStore.ts index 573a1d5..d720807 100644 --- a/frontend/src/stores/commonStore.ts +++ b/frontend/src/stores/commonStore.ts @@ -4,7 +4,6 @@ import { WindowSetDarkTheme, WindowSetLightTheme } from '../../wailsjs/runtime'; import manifest from '../../../manifest.json'; import i18n from 'i18next'; import { defaultCompositionPrompt, defaultModelConfigs, defaultModelConfigsMac } from '../pages/defaultConfigs'; -import commonStore from './commonStore'; import { ChartData } from 'chart.js'; import { Preset } from '../types/presets'; import { AboutContent } from '../types/about'; @@ -175,7 +174,7 @@ class CommonStore { createModelConfig = (config: ModelConfig = defaultModelConfigs[0], saveConfig: boolean = true) => { if (config.name === defaultModelConfigs[0].name) { // deep copy - config = JSON.parse(JSON.stringify(commonStore.platform !== 'darwin' ? defaultModelConfigs[0] : defaultModelConfigsMac[0])); + config = JSON.parse(JSON.stringify(this.platform !== 'darwin' ? defaultModelConfigs[0] : defaultModelConfigsMac[0])); config.name = new Date().toLocaleString(); } this.modelConfigs.push(config);