fix(editor): Project related frontend fixes (no-changelog) (#9482)

This commit is contained in:
Csaba Tuncsik
2024-05-22 15:54:55 +02:00
committed by GitHub
parent 62ee796895
commit 8f55bb1457
16 changed files with 170 additions and 41 deletions

View File

@@ -395,6 +395,7 @@ import type { ProjectSharingData } from '@/features/projects/projects.types';
import { useAIStore } from '@/stores/ai.store';
import { useStorage } from '@/composables/useStorage';
import { isJSPlumbEndpointElement } from '@/utils/typeGuards';
import { ProjectTypes } from '@/features/projects/projects.utils';
interface AddNodeOptions {
position?: XYPosition;
@@ -3726,6 +3727,10 @@ export default defineComponent({
await this.openWorkflow(workflow);
await this.checkAndInitDebugMode();
await this.projectsStore.setProjectNavActiveIdByWorkflowHomeProject(
workflow.homeProject,
);
if (workflow.meta?.onboardingId) {
this.$telemetry.track(
`User opened workflow from onboarding template with ID ${workflow.meta.onboardingId}`,
@@ -4670,7 +4675,7 @@ export default defineComponent({
async loadCredentials(): Promise<void> {
const workflow = this.workflowsStore.getWorkflowById(this.currentWorkflow);
const projectId =
workflow?.homeProject?.type === 'personal'
workflow?.homeProject?.type === ProjectTypes.Personal
? this.projectsStore.personalProject?.id
: workflow?.homeProject?.id;
await this.credentialsStore.fetchAllCredentials(projectId);