Minor optimizations

This commit is contained in:
Iván Ovejero
2021-11-20 18:28:05 +01:00
parent d379d7ecf3
commit b4399a1c63
19 changed files with 144 additions and 99 deletions

View File

@@ -203,17 +203,12 @@ export default mixins(renderText, restApi).extend({
},
/**
* Add to the translation object the node translation
* for the credential being viewed.
* Add to the translation object the node translation for the credential in the modal.
*/
async addNodeTranslationForCredential() {
// TODO i18n: Check if node translation has already been added (via NodeView)
const { nodeType }: { nodeType: string } = this.$store.getters.credentialTextRenderKeys;
const version = await this.getCurrentNodeVersion(nodeType);
const nodeToBeFetched = [{ name: nodeType, version }];
const nodesInfo = await this.restApi().getNodesInformation(nodeToBeFetched);
const nodeInfo = nodesInfo.pop();

View File

@@ -78,7 +78,7 @@ export default mixins(renderText).extend({
});
},
shortNodeType(nodeType: INodeTypeDescription) {
return nodeType.name.replace('n8n-nodes-base.', '');
return this.$shortNodeType(nodeType.name);
},
},
});