From 486261ec1ff19cf5e4af6246276fd75413a2ec7c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 13 Nov 2024 02:39:09 +0300 Subject: [PATCH] Refresh AC tokens after save as well --- apps/showcase/components/layout/AppDesigner.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/showcase/components/layout/AppDesigner.vue b/apps/showcase/components/layout/AppDesigner.vue index 6b761de29..ae899c6fa 100644 --- a/apps/showcase/components/layout/AppDesigner.vue +++ b/apps/showcase/components/layout/AppDesigner.vue @@ -270,8 +270,7 @@ app.mount("#app"); if (defaultTheme.customTokens) { this.customTokens = defaultTheme.customTokens; - this.acTokens = []; - this.generateACTokens(null, this.preset); + this.refreshACTokens(); } this.$toast.add({ severity: 'success', summary: 'Success', detail: 'Theme loaded to Designer', life: 3000 }); @@ -290,6 +289,7 @@ app.mount("#app"); this.preset.extend[this.transformTokenName(token.name)] = token.value; }); + this.refreshACTokens(); this.saveTheme(); this.$toast.add({ severity: 'success', summary: 'Success', detail: 'Tokens saved', life: 3000 }); }, @@ -331,6 +331,10 @@ app.mount("#app"); } } } + }, + refreshACTokens() { + this.acTokens = []; + this.generateACTokens(null, this.preset); } } };