## 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
41 lines
970 B
Vue
41 lines
970 B
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
import N8nNotice from 'n8n-design-system/components/N8nNotice';
|
|
import { formatList } from '@/utils/formatters/listFormatter';
|
|
import { useI18n } from '@/composables/useI18n';
|
|
import type {
|
|
AppCredentials,
|
|
BaseNode,
|
|
} from '@/views/SetupWorkflowFromTemplateView/useCredentialSetupState';
|
|
|
|
const i18n = useI18n();
|
|
|
|
const props = defineProps<{
|
|
appCredentials: Array<AppCredentials<BaseNode>>;
|
|
}>();
|
|
|
|
const formatApp = (app: AppCredentials<BaseNode>) =>
|
|
`<b>${app.credentials.length}x ${app.appName}</b>`;
|
|
|
|
const appNodeCounts = computed(() => {
|
|
return formatList(props.appCredentials, {
|
|
formatFn: formatApp,
|
|
i18n,
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<N8nNotice :class="$style.notice" theme="info">
|
|
<i18n-t tag="span" keypath="templateSetup.instructions" scope="global">
|
|
<span v-html="appNodeCounts" />
|
|
</i18n-t>
|
|
</N8nNotice>
|
|
</template>
|
|
|
|
<style lang="scss" module>
|
|
.notice {
|
|
margin-top: 0;
|
|
}
|
|
</style>
|