refactor(editor): Migrate n8nRootStore to use composition API (no-changelog) (#9770)

This commit is contained in:
Ricardo Espinoza
2024-06-18 10:15:12 -07:00
committed by GitHub
parent 653953e2bd
commit 41e06be6fd
83 changed files with 486 additions and 410 deletions

View File

@@ -17,7 +17,7 @@
<script setup lang="ts">
import type { IVersionNode, SimplifiedNodeType } from '@/Interface';
import { useRootStore } from '@/stores/n8nRoot.store';
import { useRootStore } from '@/stores/root.store';
import { useUIStore } from '@/stores/ui.store';
import {
getBadgeIconUrl,
@@ -84,7 +84,7 @@ const color = computed(() => getNodeIconColor(props.nodeType) ?? props.colorDefa
const iconSource = computed<NodeIconSource>(() => {
const nodeType = props.nodeType;
const baseUrl = rootStore.getBaseUrl;
const baseUrl = rootStore.baseUrl;
if (nodeType) {
// If node type has icon data, use it
@@ -122,7 +122,7 @@ const badge = computed(() => {
if (nodeType && 'badgeIconUrl' in nodeType && nodeType.badgeIconUrl) {
return {
type: 'file',
src: rootStore.getBaseUrl + getBadgeIconUrl(nodeType, uiStore.appliedTheme),
src: rootStore.baseUrl + getBadgeIconUrl(nodeType, uiStore.appliedTheme),
};
}