fix(editor): Add correct add variable button message when no variables created (no-changelog) (#6028)

fix: add correct add variable button message when no variables created
This commit is contained in:
Alex Grozav 2023-04-20 14:05:50 +03:00 committed by GitHub
parent 2579fe9631
commit 6d64e3d40e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -1604,6 +1604,7 @@
"variables.heading": "Variables",
"variables.add": "Add Variable",
"variables.add.unavailable": "Upgrade plan to keep using variables",
"variables.add.unavailable.empty": "Upgrade plan to start using variables",
"variables.add.onlyOwnerCanCreate": "Only owner can create variables",
"variables.empty.heading": "{name}, let's set up a variable",
"variables.empty.heading.userNotSetup": "Set up a variable",

View file

@ -236,7 +236,9 @@ function displayName(resource: EnvironmentVariable) {
</n8n-button>
</div>
<template #content>
<span v-if="!isFeatureEnabled">{{ i18n.baseText('variables.add.unavailable') }}</span>
<span v-if="!isFeatureEnabled">{{
i18n.baseText(`variables.add.unavailable${allVariables.length === 0 ? '.empty' : ''}`)
}}</span>
<span v-else>{{ i18n.baseText('variables.add.onlyOwnerCanCreate') }}</span>
</template>
</n8n-tooltip>