From 87da099b1127c4c7bf124ab0f0d8498ffa7c74a3 Mon Sep 17 00:00:00 2001 From: Arturo Manzoli Date: Wed, 16 Oct 2024 18:22:30 -0300 Subject: [PATCH] Components: Very-generic-input-widget: Implement cockpit actions Signed-off-by: Arturo Manzoli --- .../CustomWidgetElementInstantiator.vue | 11 +- src/components/EditMenu.vue | 19 +- src/components/ElementConfigPanel.vue | 426 ++++++++++++---- src/components/ElementHugger.vue | 274 ---------- src/components/WidgetHugger.vue | 2 +- .../custom-widget-elements/Button.vue | 34 +- .../custom-widget-elements/Checkbox.vue | 47 +- .../custom-widget-elements/Dial.vue | 55 +- .../custom-widget-elements/Dropdown.vue | 89 +++- .../custom-widget-elements/Label.vue | 43 +- .../custom-widget-elements/Slider.vue | 63 ++- .../custom-widget-elements/Switch.vue | 35 +- src/components/widgets/CustomWidgetBase.vue | 45 +- src/libs/actions/data-lake.ts | 20 +- src/stores/widgetManager.ts | 37 +- src/types/widgets.ts | 470 +++++++++++------- src/views/ConfigurationActionsView.vue | 3 +- 17 files changed, 1003 insertions(+), 670 deletions(-) delete mode 100644 src/components/ElementHugger.vue diff --git a/src/components/CustomWidgetElementInstantiator.vue b/src/components/CustomWidgetElementInstantiator.vue index df2ea8f39..49a4ed9cd 100644 --- a/src/components/CustomWidgetElementInstantiator.vue +++ b/src/components/CustomWidgetElementInstantiator.vue @@ -5,8 +5,9 @@ diff --git a/src/components/EditMenu.vue b/src/components/EditMenu.vue index 5d2373e3d..738fe4f90 100644 --- a/src/components/EditMenu.vue +++ b/src/components/EditMenu.vue @@ -152,7 +152,7 @@

Widget type:

@@ -463,21 +463,17 @@
To be placed on the main view area
-
- (Click on card to add) -
+
(Drag card to add)
To be placed on the top and bottom bars
-
- (Drag card in place to add) -
+
(Drag card to add)
Create Custom Widget + >Add widget base
@@ -630,7 +626,7 @@ >
@@ -734,6 +730,7 @@ const availableCustomWidgetElementsTypes = computed(() => name: widgetType, options: {}, hash: uuid(), + isBoolean: false, managerVars: defaultCustomWidgetManagerVars, cockpitActions: [], })) diff --git a/src/components/ElementConfigPanel.vue b/src/components/ElementConfigPanel.vue index cae27548a..f68489e83 100644 --- a/src/components/ElementConfigPanel.vue +++ b/src/components/ElementConfigPanel.vue @@ -17,20 +17,29 @@ > Delete - + diff --git a/src/components/widgets/CustomWidgetBase.vue b/src/components/widgets/CustomWidgetBase.vue index c09b0cf5d..d4761609e 100644 --- a/src/components/widgets/CustomWidgetBase.vue +++ b/src/components/widgets/CustomWidgetBase.vue @@ -2,7 +2,11 @@
-