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:
@@ -161,6 +161,21 @@ export const useUIStore = defineStore(STORES.UI, {
|
||||
uiLocations: ['workflowShareModal'],
|
||||
},
|
||||
],
|
||||
dynamicTranslations: {
|
||||
workflows: {
|
||||
shareModal: {
|
||||
title: 'dynamic.workflows.shareModal.title',
|
||||
},
|
||||
sharing: {
|
||||
unavailable: {
|
||||
description: 'dynamic.workflows.sharing.unavailable.description',
|
||||
action: 'dynamic.workflows.sharing.unavailable.action',
|
||||
button: 'dynamic.workflows.sharing.unavailable.button',
|
||||
linkURL: 'https://n8n.cloud',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
draggable: {
|
||||
isDragging: false,
|
||||
type: '',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { STORES } from "@/constants";
|
||||
import { IFakeDoor, INodeUi, IRootState } from "@/Interface";
|
||||
import {IFakeDoor, INodeUi, IRootState, NestedRecord} from "@/Interface";
|
||||
import { IMenuItem } from "n8n-design-system";
|
||||
import { IWorkflowSettings } from "n8n-workflow";
|
||||
import { defineStore } from "pinia";
|
||||
@@ -15,6 +15,9 @@ export const useWebhooksStore = defineStore(STORES.WEBHOOKS, {
|
||||
globalRoleName(): string {
|
||||
return useUsersStore().globalRoleName;
|
||||
},
|
||||
getDynamicTranslations () {
|
||||
return useUIStore().dynamicTranslations;
|
||||
},
|
||||
getFakeDoorFeatures () {
|
||||
return useUIStore().fakeDoorFeatures;
|
||||
},
|
||||
@@ -61,5 +64,8 @@ export const useWebhooksStore = defineStore(STORES.WEBHOOKS, {
|
||||
setFakeDoorFeatures(fakeDoors: IFakeDoor[]): void {
|
||||
useUIStore().fakeDoorFeatures = fakeDoors;
|
||||
},
|
||||
setDynamicTranslations(translations: NestedRecord<string>): void {
|
||||
useUIStore().dynamicTranslations = translations;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user