diff --git a/ui-ngx/src/app/core/services/item-buffer.service.ts b/ui-ngx/src/app/core/services/item-buffer.service.ts index 1dc7146883..0c933d1213 100644 --- a/ui-ngx/src/app/core/services/item-buffer.service.ts +++ b/ui-ngx/src/app/core/services/item-buffer.service.ts @@ -28,6 +28,7 @@ import { DatasourceType, TargetDeviceType, Widget, + WidgetActionsMap, WidgetPosition, WidgetSize, widgetType @@ -45,6 +46,7 @@ import { findWidgetModelDefinition } from '@shared/models/widget/widget-model.de const WIDGET_ITEM = 'widget_item'; const WIDGET_REFERENCE = 'widget_reference'; +const WIDGET_ACTIONS = 'widget_actions'; const RULE_NODES = 'rule_nodes'; const RULE_CHAIN_IMPORT = 'rule_chain_import'; @@ -180,6 +182,18 @@ export class ItemBufferService { return this.storeHas(WIDGET_ITEM); } + public copyWidgetActions(actionsMap: WidgetActionsMap): void { + this.storeSet(WIDGET_ACTIONS, actionsMap); + } + + public hasWidgetActions(): boolean { + return this.storeHas(WIDGET_ACTIONS); + } + + public pasteWidgetActions(): WidgetActionsMap { + return this.storeGet(WIDGET_ACTIONS); + } + public canPasteWidgetReference(dashboard: Dashboard, state: string, layout: DashboardLayoutId, breakpoint: string): boolean { const widgetReference: WidgetReference = this.storeGet(WIDGET_REFERENCE); if (widgetReference) { diff --git a/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions-dialog.component.html b/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions-dialog.component.html index 2a83f7d1c5..dde39a2fb9 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions-dialog.component.html @@ -35,6 +35,7 @@ widget-config.actions + + + + + + + + + + + + + @if (actionSources[action.actionSourceId]?.multiple) { + + } + +