diff --git a/apps/showcase/components/layout/AppDesigner.vue b/apps/showcase/components/layout/AppDesigner.vue index 713089662..e07fbc59b 100644 --- a/apps/showcase/components/layout/AppDesigner.vue +++ b/apps/showcase/components/layout/AppDesigner.vue @@ -135,13 +135,13 @@ export default { const tokenValue = $dt(tokenName).value; const isColor = tokenName.includes('color') || tokenName.includes('background') || regex.test(tokenName); - this.$appState.designer.theme.acTokens.push({ token: tokenName, label: '{' + tokenName + '}', variable: $dt(tokenName).variable, value: tokenValue, isColor: isColor }); + this.$appState.designer.acTokens.push({ token: tokenName, label: '{' + tokenName + '}', variable: $dt(tokenName).variable, value: tokenValue, isColor: isColor }); } } } }, refreshACTokens() { - this.$appState.designer.theme.acTokens = []; + this.$appState.designer.acTokens = []; this.generateACTokens(null, this.$appState.designer.theme.preset); }, openDashboard() { diff --git a/apps/showcase/components/layout/designer/create/DesignCreateTheme.vue b/apps/showcase/components/layout/designer/create/DesignCreateTheme.vue index 81f1c559c..1bb71c4d9 100644 --- a/apps/showcase/components/layout/designer/create/DesignCreateTheme.vue +++ b/apps/showcase/components/layout/designer/create/DesignCreateTheme.vue @@ -67,6 +67,7 @@ export default { designerApiBase: runtimeConfig.public.designerApiBase }; }, + inject: ['designerService'], data() { return { themeName: null, @@ -171,15 +172,15 @@ export default { name: this.themeName, key: t_key, preset: preset, - customTokens: [], - acTokens: [], config: { baseFontSize: '14px', fontFamily: 'Inter var' } }; + this.design; this.replaceColorPalette(); usePreset(preset); + this.designerService.refreshACTokens(); this.$appState.designer.activeView = 'editor'; } diff --git a/apps/showcase/components/layout/designer/dashboard/DesignDashboard.vue b/apps/showcase/components/layout/designer/dashboard/DesignDashboard.vue index b92270812..fc5b115a3 100644 --- a/apps/showcase/components/layout/designer/dashboard/DesignDashboard.vue +++ b/apps/showcase/components/layout/designer/dashboard/DesignDashboard.vue @@ -171,9 +171,7 @@ export default { key: data.t_key, name: data.t_name, preset: JSON.parse(data.t_preset), - config: JSON.parse(data.t_config), - customTokens: [], - acTokens: [] + config: JSON.parse(data.t_config) }; usePreset(this.$appState.designer.theme.preset); diff --git a/apps/showcase/components/layout/designer/editor/custom/DesignCustomTokens.vue b/apps/showcase/components/layout/designer/editor/custom/DesignCustomTokens.vue index 29bf92219..3fe81a895 100644 --- a/apps/showcase/components/layout/designer/editor/custom/DesignCustomTokens.vue +++ b/apps/showcase/components/layout/designer/editor/custom/DesignCustomTokens.vue @@ -1,15 +1,15 @@