feat(editor): Update user management setup message when sharing is disabled (#4928)

* feat: Update user management setup message when sharing is disabled

* feat: Update messages when sharing license unavailable

* fix: fix linting issue
This commit is contained in:
Alex Grozav 2022-12-14 15:43:13 +02:00 committed by GitHub
parent a1259898c0
commit fbcbef20e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View file

@ -1097,7 +1097,8 @@
"settings.users.setupSMTPToInviteUsers": "Set up SMTP to invite users. {action}", "settings.users.setupSMTPToInviteUsers": "Set up SMTP to invite users. {action}",
"settings.users.setupSMTPToInviteUsers.instructions": "Instructions", "settings.users.setupSMTPToInviteUsers.instructions": "Instructions",
"settings.users.setupToInviteUsers": "To invite users, set up your own account", "settings.users.setupToInviteUsers": "To invite users, set up your own account",
"settings.users.setupToInviteUsersInfo": "Invited users wont be able to see workflows and credentials of other users. <a href=\"https://docs.n8n.io/reference/user-management.html\" target=\"_blank\">More info</a> <br /> <br /> You will need details of an <a href=\"https://docs.n8n.io/reference/user-management.html#step-one-smtp\" target=\"_blank\">SMTP server</a> to complete the setup.", "settings.users.setupToInviteUsersInfo": "Invited users wont be able to see workflows and credentials of other users unless you upgrade. <a href=\"https://docs.n8n.io/reference/user-management.html\" target=\"_blank\">More info</a> <br /> <br />",
"settings.users.setupSMTPInfo": "You will need details of an <a href=\"https://docs.n8n.io/reference/user-management.html#step-one-smtp\" target=\"_blank\">SMTP server</a> to complete the setup.",
"settings.users.smtpToAddUsersWarning": "Set up SMTP before adding users (so that n8n can send them invitation emails). <a target=\"_blank\" href=\"https://docs.n8n.io/reference/user-management.html#step-one-smtp\">Instructions</a>", "settings.users.smtpToAddUsersWarning": "Set up SMTP before adding users (so that n8n can send them invitation emails). <a target=\"_blank\" href=\"https://docs.n8n.io/reference/user-management.html#step-one-smtp\">Instructions</a>",
"settings.users.transferWorkflowsAndCredentials": "Transfer their workflows and credentials to another user", "settings.users.transferWorkflowsAndCredentials": "Transfer their workflows and credentials to another user",
"settings.users.transferredToUser": "Data transferred to {user}", "settings.users.transferredToUser": "Data transferred to {user}",
@ -1416,8 +1417,6 @@
"workflows.shareModal.saveBeforeClose.cancelButtonText": "Close without saving", "workflows.shareModal.saveBeforeClose.cancelButtonText": "Close without saving",
"workflows.shareModal.save": "Save", "workflows.shareModal.save": "Save",
"workflows.shareModal.changesHint": "You made changes", "workflows.shareModal.changesHint": "You made changes",
"workflows.shareModal.notAvailable": "Sharing workflows with others is currently available only on n8n cloud, our hosted offering.",
"workflows.shareModal.notAvailable.button": "Explore n8n cloud",
"workflows.shareModal.isDefaultUser.description": "You first need to set up your owner account to enable workflow sharing features.", "workflows.shareModal.isDefaultUser.description": "You first need to set up your owner account to enable workflow sharing features.",
"workflows.shareModal.isDefaultUser.button": "Go to settings", "workflows.shareModal.isDefaultUser.button": "Go to settings",
"workflows.shareModal.info.sharee": "Only {workflowOwnerName} can change who this workflow is shared with", "workflows.shareModal.info.sharee": "Only {workflowOwnerName} can change who this workflow is shared with",
@ -1440,11 +1439,11 @@
"importParameter.showError.invalidProtocol.message": "The HTTP node doesnt support {protocol} requests", "importParameter.showError.invalidProtocol.message": "The HTTP node doesnt support {protocol} requests",
"dynamic.workflows.shareModal.title": "Share '{name}'", "dynamic.workflows.shareModal.title": "Share '{name}'",
"dynamic.workflows.shareModal.title.cloud.upgrade": "Upgrade to add users", "dynamic.workflows.shareModal.title.cloud.upgrade": "Upgrade to add users",
"dynamic.workflows.sharing.unavailable.description": "Sharing workflows with others is currently available only on n8n cloud, our hosted offering. {action}", "dynamic.workflows.sharing.unavailable.description": "You can collaborate with others on workflows when you upgrade your plan. {action}",
"dynamic.workflows.sharing.unavailable.description.cloud.upgrade": "Sharing is available for Team and Enterprise plans. {action} to unlock more features.", "dynamic.workflows.sharing.unavailable.description.cloud.upgrade": "Sharing is available for Team and Enterprise plans. {action} to unlock more features.",
"dynamic.workflows.sharing.unavailable.action": "Explore n8n cloud", "dynamic.workflows.sharing.unavailable.action": "See plans",
"dynamic.workflows.sharing.unavailable.action.cloud.upgrade": "Upgrade now", "dynamic.workflows.sharing.unavailable.action.cloud.upgrade": "Upgrade now",
"dynamic.workflows.sharing.unavailable.button": "Explore n8n cloud", "dynamic.workflows.sharing.unavailable.button": "See plans",
"dynamic.workflows.sharing.unavailable.button.cloud.upgrade": "Upgrade now", "dynamic.workflows.sharing.unavailable.button.cloud.upgrade": "Upgrade now",
"dynamic.workflows.sharing.unavailable.linkUrl": "https://n8n.cloud" "dynamic.workflows.sharing.unavailable.linkUrl": "https://subscription.n8n.io/"
} }

View file

@ -30,7 +30,7 @@
<n8n-action-box <n8n-action-box
:heading="$locale.baseText('settings.users.setupToInviteUsers')" :heading="$locale.baseText('settings.users.setupToInviteUsers')"
:buttonText="$locale.baseText('settings.users.setupMyAccount')" :buttonText="$locale.baseText('settings.users.setupMyAccount')"
:description="$locale.baseText('settings.users.setupToInviteUsersInfo')" :description="`${isSharingEnabled ? '' : $locale.baseText('settings.users.setupToInviteUsersInfo')}${$locale.baseText('settings.users.setupSMTPInfo')}`"
@click="redirectToSetup" @click="redirectToSetup"
/> />
</div> </div>
@ -51,7 +51,11 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { INVITE_USER_MODAL_KEY, VIEWS } from '@/constants'; import {
EnterpriseEditionFeature,
INVITE_USER_MODAL_KEY,
VIEWS,
} from '@/constants';
import PageAlert from '../components/PageAlert.vue'; import PageAlert from '../components/PageAlert.vue';
import { IUser } from '@/Interface'; import { IUser } from '@/Interface';
@ -74,6 +78,9 @@ export default mixins(showMessage).extend({
}, },
computed: { computed: {
...mapStores(useSettingsStore, useUIStore, useUsersStore), ...mapStores(useSettingsStore, useUIStore, useUsersStore),
isSharingEnabled() {
return this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing);
},
}, },
methods: { methods: {
redirectToSetup() { redirectToSetup() {