mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Fix new node credential creation via Resource Locator Component (#9896)
This commit is contained in:
@@ -175,6 +175,7 @@ import ResourceLocatorDropdown from './ResourceLocatorDropdown.vue';
|
||||
import { useDebounce } from '@/composables/useDebounce';
|
||||
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ndvEventBus } from '@/event-bus';
|
||||
|
||||
interface IResourceLocatorQuery {
|
||||
results: INodeListSearchItems[];
|
||||
@@ -566,12 +567,18 @@ export default defineComponent({
|
||||
if (!nodeType) {
|
||||
return;
|
||||
}
|
||||
|
||||
const defaultCredentialType = nodeType.credentials?.[0].name ?? '';
|
||||
const mainAuthType = getMainAuthField(nodeType);
|
||||
const showAuthSelector =
|
||||
const showAuthOptions =
|
||||
mainAuthType !== null &&
|
||||
Array.isArray(mainAuthType.options) &&
|
||||
mainAuthType.options?.length > 0;
|
||||
this.uiStore.openNewCredential('', showAuthSelector);
|
||||
|
||||
ndvEventBus.emit('credential.createNew', {
|
||||
type: defaultCredentialType,
|
||||
showAuthOptions,
|
||||
});
|
||||
},
|
||||
findModeByName(name: string): INodePropertyMode | null {
|
||||
if (this.parameter.modes) {
|
||||
|
||||
Reference in New Issue
Block a user