diff --git a/src/components/custom/widget/NewWorkflowTemplateSelectorDialog.vue b/src/components/custom/widget/NewWorkflowTemplateSelectorDialog.vue new file mode 100644 index 0000000000..c41c06c997 --- /dev/null +++ b/src/components/custom/widget/NewWorkflowTemplateSelectorDialog.vue @@ -0,0 +1,678 @@ + + + + + + + + + {{ + $t('sideToolbar.templates', 'Templates') + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('templateWorkflows.loading', 'Loading templates...') }} + + + + + + + + {{ $t('templateWorkflows.noResults', 'No templates found') }} + + + {{ + $t( + 'templateWorkflows.noResultsHint', + 'Try adjusting your search or filters' + ) + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ + getTemplateTitle( + template, + template.sourceModule || 'default' + ) + }} + + + {{ getTemplateDescription(template) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('templateWorkflows.loadingMore', 'Loading more...') }} + + + + + + {{ + $t('templateWorkflows.resultsCount', { + count: filteredCount, + total: totalCount + }) + }} + + + + + + + + diff --git a/src/composables/useWorkflowTemplateSelectorDialog.ts b/src/composables/useWorkflowTemplateSelectorDialog.ts index bcb944a46e..2fd1b22b0c 100644 --- a/src/composables/useWorkflowTemplateSelectorDialog.ts +++ b/src/composables/useWorkflowTemplateSelectorDialog.ts @@ -1,4 +1,4 @@ -import WorkflowTemplateSelector from '@/components/custom/widget/WorkflowTemplateSelector.vue' +import NewWorkflowTemplateSelectorDialog from '@/components/custom/widget/NewWorkflowTemplateSelectorDialog.vue' import { useDialogService } from '@/services/dialogService' import { useDialogStore } from '@/stores/dialogStore' @@ -15,7 +15,7 @@ export const useWorkflowTemplateSelectorDialog = () => { function show() { dialogService.showLayoutDialog({ key: DIALOG_KEY, - component: WorkflowTemplateSelector, + component: NewWorkflowTemplateSelectorDialog, props: { onClose: hide } diff --git a/src/services/dialogService.ts b/src/services/dialogService.ts index ee60fc14ac..bd194bde5b 100644 --- a/src/services/dialogService.ts +++ b/src/services/dialogService.ts @@ -1,7 +1,7 @@ import { merge } from 'es-toolkit/compat' import { Component } from 'vue' -import WorkflowTemplateSelector from '@/components/custom/widget/WorkflowTemplateSelector.vue' +import NewWorkflowTemplateSelectorDialog from '@/components/custom/widget/NewWorkflowTemplateSelectorDialog.vue' import ApiNodesSignInContent from '@/components/dialog/content/ApiNodesSignInContent.vue' import ConfirmationDialogContent from '@/components/dialog/content/ConfirmationDialogContent.vue' import ErrorDialogContent from '@/components/dialog/content/ErrorDialogContent.vue' @@ -145,7 +145,7 @@ export const useDialogService = () => { showLayoutDialog({ key: 'global-workflow-template-selector', - component: WorkflowTemplateSelector, + component: NewWorkflowTemplateSelectorDialog, // Pass through sizing hint so inner layout adapts to parent rather than viewport props: { onClose: () =>
+ {{ $t('templateWorkflows.noResults', 'No templates found') }} +
+ {{ + $t( + 'templateWorkflows.noResultsHint', + 'Try adjusting your search or filters' + ) + }} +
+ {{ getTemplateDescription(template) }} +