From fde58abda3c4c75300194197058a6b764e8fae0d Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Thu, 28 Aug 2025 20:46:36 +0100 Subject: [PATCH] feat: add tutorial button and corresponding tooltip in TemplateWorkflowCard --- src/assets/icons/custom/dark-info.svg | 10 ++++++ .../templates/TemplateWorkflowCard.vue | 31 ++++++++++++++++--- src/locales/en/main.json | 3 +- 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 src/assets/icons/custom/dark-info.svg diff --git a/src/assets/icons/custom/dark-info.svg b/src/assets/icons/custom/dark-info.svg new file mode 100644 index 000000000..26c05560f --- /dev/null +++ b/src/assets/icons/custom/dark-info.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/components/templates/TemplateWorkflowCard.vue b/src/components/templates/TemplateWorkflowCard.vue index 81be01926..c13f56ed7 100644 --- a/src/components/templates/TemplateWorkflowCard.vue +++ b/src/components/templates/TemplateWorkflowCard.vue @@ -65,7 +65,7 @@ {{ tag }} @@ -85,9 +85,26 @@

{{ title }}

-

- {{ description }} -

+
+

+ {{ description }} +

+
+ +
+
@@ -148,6 +165,12 @@ const description = computed(() => getTemplateDescription(template)) const title = computed(() => getTemplateTitle(template, effectiveSourceModule.value) ) +const openTutorial = (event: Event) => { + event.stopPropagation() + if (template.tutorialUrl) { + window.open(template.tutorialUrl, '_blank', 'noopener') + } +} defineEmits<{ loadWorkflow: [name: string] diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 07e37f7da..0a3def2f1 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -149,7 +149,8 @@ "noAudioRecorded": "No audio recorded", "nodesRunning": "nodes running", "duplicate": "Duplicate", - "moreWorkflows": "More workflows" + "moreWorkflows": "More workflows", + "seeTutorial": "See a tutorial" }, "manager": { "title": "Custom Nodes Manager",