diff --git a/apps/showcase/components/layout/designer/editor/DesignEditor.vue b/apps/showcase/components/layout/designer/editor/DesignEditor.vue index 0371304a3..b28503e39 100644 --- a/apps/showcase/components/layout/designer/editor/DesignEditor.vue +++ b/apps/showcase/components/layout/designer/editor/DesignEditor.vue @@ -59,7 +59,7 @@ - + @@ -101,10 +101,7 @@ export default { }, computed: { isComponentRoute() { - const components = this.$appState.designer.theme.preset.components; - const directives = this.$appState.designer.theme.preset.directives; - - return components[this.$route.name] != null || directives[this.$route.name]; + return this.$appState.designer.theme.preset?.components[this.$route.name] != null; } } }; diff --git a/apps/showcase/components/layout/designer/editor/DesignTokenField.vue b/apps/showcase/components/layout/designer/editor/DesignTokenField.vue index a9c78b30c..449a6bec0 100644 --- a/apps/showcase/components/layout/designer/editor/DesignTokenField.vue +++ b/apps/showcase/components/layout/designer/editor/DesignTokenField.vue @@ -117,7 +117,7 @@ export default { return colorScheme; }, transfer(event) { - let tokens = this.$appState.designer.theme.preset.components[this.componentKey] || this.$appState.designer.theme.preset.directives[this.componentKey]; + let tokens = this.$appState.designer.theme.preset.components[this.componentKey]; const colorSchemePrefix = 'colorScheme.'; if (this.path.startsWith(colorSchemePrefix)) { diff --git a/apps/showcase/components/layout/designer/editor/component/DesignComponent.vue b/apps/showcase/components/layout/designer/editor/component/DesignComponent.vue index 916a10222..2d4750722 100644 --- a/apps/showcase/components/layout/designer/editor/component/DesignComponent.vue +++ b/apps/showcase/components/layout/designer/editor/component/DesignComponent.vue @@ -1,5 +1,5 @@ - + {{ componentKey }} @@ -38,14 +38,8 @@ export default { componentKey() { return this.$route.name; }, - isComponentRoute() { - const components = this.$appState.designer.theme.preset.components; - const directives = this.$appState.designer.theme.preset.directives; - - return components[this.componentKey] != null || directives[this.componentKey] != null; - }, tokens() { - return this.$appState.designer.theme.preset.components[this.componentKey] || this.$appState.designer.theme.preset.directives[this.componentKey]; + return this.$appState.designer.theme.preset.components[this.componentKey]; }, lightTokens() { return this.tokens.colorScheme?.light; diff --git a/apps/showcase/components/layout/designer/editor/component/DesignComponentSection.vue b/apps/showcase/components/layout/designer/editor/component/DesignComponentSection.vue index 8bbb76604..9671a0a99 100644 --- a/apps/showcase/components/layout/designer/editor/component/DesignComponentSection.vue +++ b/apps/showcase/components/layout/designer/editor/component/DesignComponentSection.vue @@ -66,7 +66,7 @@ export default { .join(' '); }, tokens() { - const source = this.$appState.designer.theme.preset.components[this.componentKey] || this.$appState.designer.theme.preset.directives[this.componentKey]; + const source = this.$appState.designer.theme.preset.components[this.componentKey]; return this.getObjectProperty(source, this.path); },