feat: Add dynamic translations. Change how sharing unavailable is handled (no-changelog) (#4758)

* feat: Add dynamic translations. Change how sharing unavailable is handled (no-changelog)

* fix: Add not-allowed cursor for disabled share button

* fix: Remove fakedoor features from workflow details

* fix: Remove fakedoor code from workflow share modal

* fix: change dynamic translation to match shareModal title

* chore: Removed unused import
This commit is contained in:
Alex Grozav
2022-11-29 15:13:10 +02:00
committed by GitHub
parent 86a4965e9a
commit b1287ba8cb
6 changed files with 73 additions and 16 deletions

View File

@@ -75,6 +75,25 @@
>
{{ $locale.baseText('workflowDetails.share') }}
</n8n-button>
<template #fallback>
<n8n-tooltip>
<n8n-button
type="secondary"
:class="['mr-2xs', $style.disabledShareButton]"
>
{{ $locale.baseText('workflowDetails.share') }}
</n8n-button>
<template #content>
<i18n :path="dynamicTranslations.workflows.sharing.unavailable.description" tag="span">
<template #action>
<a :href="dynamicTranslations.workflows.sharing.unavailable.linkURL" target="_blank">
{{ $locale.baseText(dynamicTranslations.workflows.sharing.unavailable.action) }}
</a>
</template>
</i18n>
</template>
</n8n-tooltip>
</template>
</enterprise-edition>
<SaveButton
type="primary"
@@ -114,7 +133,7 @@ import SaveButton from "@/components/SaveButton.vue";
import TagsDropdown from "@/components/TagsDropdown.vue";
import InlineTextEdit from "@/components/InlineTextEdit.vue";
import BreakpointsObserver from "@/components/BreakpointsObserver.vue";
import {IWorkflowDataUpdate, IWorkflowDb, IWorkflowToShare} from "@/Interface";
import {IWorkflowDataUpdate, IWorkflowDb, IWorkflowToShare, NestedRecord} from "@/Interface";
import { saveAs } from 'file-saver';
import { titleChange } from "@/mixins/titleChange";
@@ -169,6 +188,9 @@ export default mixins(workflowHelpers, titleChange).extend({
useWorkflowsStore,
useUsersStore,
),
dynamicTranslations(): NestedRecord<string> {
return this.uiStore.dynamicTranslations;
},
isWorkflowActive(): boolean {
return this.workflowsStore.isWorkflowActive;
},
@@ -548,4 +570,8 @@ $--header-spacing: 20px;
.deleteItem {
color: var(--color-danger);
}
.disabledShareButton {
cursor: not-allowed;
}
</style>