Post-merge fixes

This commit is contained in:
Iván Ovejero 2022-05-05 18:12:08 +02:00
parent eebc6ddf2e
commit e530bd45e8
2 changed files with 9 additions and 8 deletions

View file

@ -121,7 +121,7 @@ export default mixins(
credentialTypesNodeDescription (): INodeCredentialDescription[] { credentialTypesNodeDescription (): INodeCredentialDescription[] {
const node = this.node as INodeUi; const node = this.node as INodeUi;
if (this.node.type === HTTP_REQUEST_NODE_TYPE && this.node.typeVersion === 2) { if (this.isHttpRequestNodeV2(this.node)) {
this.$emit('newHttpRequestNodeCredentialType', this.node.parameters.nodeCredentialType); this.$emit('newHttpRequestNodeCredentialType', this.node.parameters.nodeCredentialType);
} }

View file

@ -24,7 +24,7 @@
<div class="node-parameters-wrapper" v-if="node && nodeValid"> <div class="node-parameters-wrapper" v-if="node && nodeValid">
<div v-show="openPanel === 'params'"> <div v-show="openPanel === 'params'">
<n8n-notice <n8n-notice
v-if="isHttpRequestNodeV2 && scopes.length > 0" v-if="isHttpRequestNodeV2(node) && scopes.length > 0"
:truncate="true" :truncate="true"
:content="$locale.baseText( :content="$locale.baseText(
'nodeSettings.scopes', 'nodeSettings.scopes',
@ -45,11 +45,11 @@
:parameters="parametersNoneSetting" :parameters="parametersNoneSetting"
:hideDelete="true" :hideDelete="true"
:nodeValues="nodeValues" path="parameters" @valueChanged="valueChanged" :nodeValues="nodeValues" path="parameters" @valueChanged="valueChanged"
@newHttpRequestNodeCredentialType="loadScopesNoticeData"
> >
<node-credentials <node-credentials
:node="node" :node="node"
@credentialSelected="credentialSelected" @credentialSelected="credentialSelected"
@newHttpRequestNodeCredentialType="loadScopesNoticeData"
/> />
</parameter-input-list> </parameter-input-list>
<div v-if="parametersNoneSetting.length === 0" class="no-parameters"> <div v-if="parametersNoneSetting.length === 0" class="no-parameters">
@ -96,7 +96,6 @@ import { nodeHelpers } from '@/components/mixins/nodeHelpers';
import mixins from 'vue-typed-mixins'; import mixins from 'vue-typed-mixins';
import NodeExecuteButton from './NodeExecuteButton.vue'; import NodeExecuteButton from './NodeExecuteButton.vue';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { HTTP_REQUEST_NODE_TYPE } from '@/constants';
export default mixins( export default mixins(
externalHooks, externalHooks,
@ -116,9 +115,6 @@ export default mixins(
}, },
computed: { computed: {
...mapGetters('credentials', [ 'getCredentialTypeByName' ]), ...mapGetters('credentials', [ 'getCredentialTypeByName' ]),
isHttpRequestNodeV2(): boolean {
return this.node.type === HTTP_REQUEST_NODE_TYPE && this.node.typeVersion === 2;
},
nodeType (): INodeTypeDescription | null { nodeType (): INodeTypeDescription | null {
if (this.node) { if (this.node) {
return this.$store.getters.nodeType(this.node.type, this.node.typeVersion); return this.$store.getters.nodeType(this.node.type, this.node.typeVersion);
@ -305,7 +301,7 @@ export default mixins(
}, },
methods: { methods: {
async loadScopesNoticeData(activeCredentialType: string) { async loadScopesNoticeData(activeCredentialType: string) {
if (!this.isHttpRequestNodeV2) return; if (!this.isHttpRequestNodeV2(this.node)) return;
if ( if (
!activeCredentialType || !activeCredentialType ||
@ -617,6 +613,11 @@ export default mixins(
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
padding: 0 20px 200px 20px; padding: 0 20px 200px 20px;
// @TODO Revisit
> div > .notice[role=alert] {
margin-top: var(--spacing-s);
}
} }
} }