Update after directives move to components change
parent
3e7739b1e7
commit
a255bd1778
|
@ -59,7 +59,7 @@
|
|||
</Accordion>
|
||||
</TabPanel>
|
||||
<TabPanel value="2">
|
||||
<form @keydown="onKeyDown">
|
||||
<form v-if="isComponentRoute" @keydown="onKeyDown">
|
||||
<DesignComponent />
|
||||
</form>
|
||||
</TabPanel>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<section v-if="isComponentRoute">
|
||||
<section>
|
||||
<div class="text-lg font-semibold capitalize mb-2">{{ componentKey }}</div>
|
||||
<Fieldset legend="Common" :toggleable="true" class="mb-3">
|
||||
<div class="flex flex-col gap-3">
|
||||
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue