fix(editor): Show appropriate empty workflow list content when instance environment is readonly (#6610)

This commit is contained in:
Csaba Tuncsik 2023-07-06 15:57:39 +02:00 committed by GitHub
parent 8002213538
commit 7515f7d52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View file

@ -225,10 +225,7 @@ export default defineComponent({
void this.checkForNewVersions();
void this.checkForCloudPlanData();
if (
this.sourceControlStore.isEnterpriseSourceControlEnabled &&
this.usersStore.isInstanceOwner
) {
if (this.sourceControlStore.isEnterpriseSourceControlEnabled) {
await this.sourceControlStore.getPreferences();
}

View file

@ -1682,6 +1682,7 @@
"workflows.empty.heading": "👋 Welcome {name}!",
"workflows.empty.heading.userNotSetup": "👋 Welcome!",
"workflows.empty.description": "Create your first workflow",
"workflows.empty.description.readOnlyEnv": "No workflows here yet",
"workflows.empty.startFromScratch": "Start from scratch",
"workflows.shareModal.title": "Share '{name}'",
"workflows.shareModal.select.placeholder": "Add users...",

View file

@ -23,7 +23,7 @@
:readOnly="readOnlyEnv"
/>
</template>
<template v-if="!readOnlyEnv" #empty>
<template #empty>
<div class="text-center mt-s">
<n8n-heading tag="h2" size="xlarge" class="mb-2xs">
{{
@ -36,10 +36,16 @@
}}
</n8n-heading>
<n8n-text size="large" color="text-base">
{{ $locale.baseText('workflows.empty.description') }}
{{
$locale.baseText(
readOnlyEnv
? 'workflows.empty.description.readOnlyEnv'
: 'workflows.empty.description',
)
}}
</n8n-text>
</div>
<div :class="['text-center', 'mt-2xl', $style.actionsContainer]">
<div v-if="!readOnlyEnv" :class="['text-center', 'mt-2xl', $style.actionsContainer]">
<n8n-card
:class="$style.emptyStateCard"
hoverable