feat: Enable cred setup for workflows created from templates (no-changelog) (#8240)

## Summary

Enable users to open credential setup for workflows that have been
created from templates if they skip it.

Next steps (will be their own PRs):
- Add telemetry events
- Add e2e test
- Hide the button when user sets up all the credentials
- Change the feature flag to a new one

## Related tickets and issues

https://linear.app/n8n/issue/ADO-1637/feature-support-template-credential-setup-for-http-request-nodes-that
This commit is contained in:
Tomi Turtiainen
2024-01-05 18:07:57 +02:00
committed by GitHub
parent df5d07bcb8
commit 3cf6704dbb
22 changed files with 858 additions and 560 deletions

View File

@@ -96,6 +96,11 @@
@stopExecution="stopExecution"
@saveKeyboardShortcut="onSaveKeyboardShortcut"
/>
<Suspense>
<div :class="$style.setupCredentialsButtonWrapper">
<SetupWorkflowCredentialsButton />
</div>
</Suspense>
<Suspense>
<NodeCreation
v-if="!isReadOnlyRoute && !readOnlyEnv"
@@ -381,6 +386,10 @@ interface AddNodeOptions {
const NodeCreation = defineAsyncComponent(async () => import('@/components/Node/NodeCreation.vue'));
const CanvasControls = defineAsyncComponent(async () => import('@/components/CanvasControls.vue'));
const SetupWorkflowCredentialsButton = defineAsyncComponent(
async () =>
import('@/components/SetupWorkflowCredentialsButton/SetupWorkflowCredentialsButton.vue'),
);
export default defineComponent({
name: 'NodeView',
@@ -393,6 +402,7 @@ export default defineComponent({
NodeCreation,
CanvasControls,
ContextMenu,
SetupWorkflowCredentialsButton,
},
mixins: [moveNodeWorkflow, workflowHelpers, workflowRun, debounceHelper],
async beforeRouteLeave(to, from, next) {
@@ -5180,4 +5190,10 @@ export default defineComponent({
transform: translate3d(4px, 0, 0);
}
}
.setupCredentialsButtonWrapper {
position: absolute;
left: 35px;
top: var(--spacing-s);
}
</style>