From a1cdc760939ffec881fbe06213cbfe7ff09eace4 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Mon, 18 Sep 2023 17:16:01 -0300 Subject: [PATCH] Use new per-widget editing control on `MiniWidgetBar` With this new approach, we are able to remove mini-widgets from the `MiniWidgetBar` in an intuitive and transparent way. The user can basically drag mini-widgets out of the container while in edit-mode, instead of having to get out of edit-mode and click on the widget edit button. --- src/components/MiniWidgetContainer.vue | 7 +++++++ src/components/widgets/MiniWidgetsBar.vue | 20 ++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/components/MiniWidgetContainer.vue b/src/components/MiniWidgetContainer.vue index 07fd654a0..85e703460 100644 --- a/src/components/MiniWidgetContainer.vue +++ b/src/components/MiniWidgetContainer.vue @@ -10,6 +10,8 @@ @start="showWidgetTrashArea = true" @end="showWidgetTrashArea = false" @add="refreshWidgetsHashs" + @choose="(event) => emit('chooseMiniWidget', event)" + @unchoose="(event) => emit('unchooseMiniWidget', event)" >
() + // eslint-disable-next-line jsdoc/require-jsdoc interface Props { /** diff --git a/src/components/widgets/MiniWidgetsBar.vue b/src/components/widgets/MiniWidgetsBar.vue index 7e9044780..10e4467e8 100644 --- a/src/components/widgets/MiniWidgetsBar.vue +++ b/src/components/widgets/MiniWidgetsBar.vue @@ -1,27 +1,19 @@