Fixed new/open credentials from menu. UTM link adjusted for unknown nodes base.

This commit is contained in:
Rupenieks 2020-08-25 14:28:16 +02:00
parent d5dda2e35a
commit d8e8db39c4

View file

@ -2,26 +2,27 @@
<div v-if="dialogVisible" @keydown.stop>
<el-dialog :visible="dialogVisible" append-to-body width="55%" :title="title" :nodeType="nodeType" :before-close="closeDialog">
<div name="title" class="titleContainer" slot="title">
<div id="left">{{title}}</div>
<div id="left">{{title}}</div>
<div id="right">
<div id="docsContainer">
<svg id="help-logo" :href="'https://docs.n8n.io/credentials/' + nodeType.displayName" target="_blank" width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Node Documentation</title>
<g id="MVP-Onboard-proposal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Node-modal-(docs-link)" transform="translate(-1127.000000, -836.000000)" fill-rule="nonzero">
<g id="Group" transform="translate(1117.000000, 825.000000)">
<g id="mdi-help-box" transform="translate(10.000000, 11.000000)">
<g id="Icon" transform="translate(2.250000, 2.250000)" fill="#FF6150">
<path d="M6,11.25 L7.5,11.25 L7.5,9.75 L6,9.75 L6,11.25 M6.75,2.25 C5.09314575,2.25 3.75,3.59314575 3.75,5.25 L5.25,5.25 C5.25,4.42157288 5.92157288,3.75 6.75,3.75 C7.57842712,3.75 8.25,4.42157288 8.25,5.25 C8.25,6.75 6,6.5625 6,9 L7.5,9 C7.5,7.3125 9.75,7.125 9.75,5.25 C9.75,3.59314575 8.40685425,2.25 6.75,2.25 M1.5,0 L12,0 C12.8284271,0 13.5,0.671572875 13.5,1.5 L13.5,12 C13.5,12.8284271 12.8284271,13.5 12,13.5 L1.5,13.5 C0.671572875,13.5 0,12.8284271 0,12 L0,1.5 C0,0.671572875 0.671572875,0 1.5,0 Z" id="Icon-Shape"></path>
<div id="docsContainer">
<svg id="help-logo" target="_blank" width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Node Documentation</title>
<g id="MVP-Onboard-proposal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Node-modal-(docs-link)" transform="translate(-1127.000000, -836.000000)" fill-rule="nonzero">
<g id="Group" transform="translate(1117.000000, 825.000000)">
<g id="mdi-help-box" transform="translate(10.000000, 11.000000)">
<g id="Icon" transform="translate(2.250000, 2.250000)" fill="#FF6150">
<path d="M6,11.25 L7.5,11.25 L7.5,9.75 L6,9.75 L6,11.25 M6.75,2.25 C5.09314575,2.25 3.75,3.59314575 3.75,5.25 L5.25,5.25 C5.25,4.42157288 5.92157288,3.75 6.75,3.75 C7.57842712,3.75 8.25,4.42157288 8.25,5.25 C8.25,6.75 6,6.5625 6,9 L7.5,9 C7.5,7.3125 9.75,7.125 9.75,5.25 C9.75,3.59314575 8.40685425,2.25 6.75,2.25 M1.5,0 L12,0 C12.8284271,0 13.5,0.671572875 13.5,1.5 L13.5,12 C13.5,12.8284271 12.8284271,13.5 12,13.5 L1.5,13.5 C0.671572875,13.5 0,12.8284271 0,12 L0,1.5 C0,0.671572875 0.671572875,0 1.5,0 Z" id="Icon-Shape"></path>
</g>
<rect id="ViewBox" x="0" y="0" width="18" height="18"></rect>
</g>
<rect id="ViewBox" x="0" y="0" width="18" height="18"></rect>
</g>
</g>
</g>
</g>
</svg>
<span id='docLinkText'>Need help? <a id="doc-hyperlink" :href="'https://docs.n8n.io/credentials/' + documentationUrl + '/?utm_source=n8n_app&utm_medium=add_credential_modal-credential_link&utm_campaign=' + nodeType.name" target="_blank">Open credential docs</a></span>
</div>
</svg>
<span v-if="nodeType" id='docLinkText'>Need help? <a id="doc-hyperlink" :href="'https://docs.n8n.io/credentials/' + documentationUrl + '/?utm_source=n8n_app&utm_medium=add_credential_modal-credential_link&utm_campaign=' + nodeType.name" target="_blank">Open credential docs</a></span>
<span v-if="!nodeType" id='docLinkText'>Need help? <a id="doc-hyperlink" :href="'https://docs.n8n.io/credentials/' + documentationUrl + '/?utm_source=n8n_app&utm_medium=add_credential_modal-credential_link&utm_campaign=unknown-nodes-base.' + documentationUrl" target="_blank">Open credential docs</a></span>
</div>
</div>
</div>
<div class="credential-type-item">
@ -118,14 +119,18 @@ export default mixins(
return `${credentialType.documentationUrl}`;
}
} else {
const credentialType = this.$store.getters.credentialType(this.credentialType);
if (credentialType.documentationUrl === undefined) {
return credentialType.name;
if (this.credentialType) {
const credentialType = this.$store.getters.credentialType(this.credentialType);
if (credentialType.documentationUrl === undefined) {
return credentialType.name;
} else {
return `${credentialType.documentationUrl}`;
}
} else {
return `${credentialType.documentationUrl}`;
return '';
}
}
},
node (): INodeUi {
return this.$store.getters.activeNode;
@ -368,7 +373,7 @@ export default mixins(
text-decoration: none;
color: #FF6150;
}
</style>