From e7091d6726eb98a194bc2614c0da332d348180dc Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Tue, 18 Jul 2023 11:18:07 +0200 Subject: [PATCH] fix(editor): Add paywall state to non owner users for Variables (#6679) * fix(editor): Add paywall state to non owner users for Variables * fix(editor): Add variables view tests * fix(editor): remove link from paywall state for non owner * fix(editor): fix displaying logic --- .../src/plugins/i18n/locales/en.json | 2 + .../editor-ui/src/views/VariablesView.vue | 15 ++++- .../src/views/__tests__/VariablesView.spec.ts | 67 ++++++++++++++++--- 3 files changed, 72 insertions(+), 12 deletions(-) diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index ef9af4f7a..affdc5a6e 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -1729,6 +1729,8 @@ "variables.empty.heading.userNotSetup": "Set up a variable", "variables.empty.description": "Variables can be used to store data that can be referenced easily across multiple workflows.", "variables.empty.button": "Add first variable", + "variables.empty.notAllowedToCreate.heading": "{name}, start using variables", + "variables.empty.notAllowedToCreate.description": "Ask your n8n instance owner to create the variables you need. Once configured, you can utilize them in your workflows using the syntax $vars.MY_VAR.", "variables.noResults": "No variables found", "variables.sort.nameAsc": "Sort by name (A-Z)", "variables.sort.nameDesc": "Sort by name (Z-A)", diff --git a/packages/editor-ui/src/views/VariablesView.vue b/packages/editor-ui/src/views/VariablesView.vue index 9d7442f2e..9e1f742f8 100644 --- a/packages/editor-ui/src/views/VariablesView.vue +++ b/packages/editor-ui/src/views/VariablesView.vue @@ -278,8 +278,9 @@ onBeforeUnmount(() => { @click="goToUpgrade" /> -