From 24290980d69256cc706874a16936d8fe47ab7341 Mon Sep 17 00:00:00 2001 From: Thierry Date: Thu, 14 Nov 2024 10:21:43 +0100 Subject: [PATCH 1/2] feat(web-core): add useDisabled composable, deprecate useContext, and replace DisabledContext usage --- .../lite/src/components/RouterTab.vue | 16 ++++----- .../lite/src/components/form/FormCheckbox.vue | 18 ++++------ .../lite/src/components/form/FormInput.vue | 34 +++++++++---------- .../src/components/form/FormInputWrapper.vue | 30 ++++++++-------- .../lite/src/components/ui/UiActionButton.vue | 20 +++++------ .../lite/src/components/ui/modals/UiModal.vue | 5 +-- .../vm/VmActionItems/VmActionExportItem.vue | 7 ++-- .../vm/VmActionItems/VmActionMigrateItem.vue | 9 +++-- @xen-orchestra/lite/src/context.ts | 2 -- .../web-core/lib/components/menu/MenuItem.vue | 20 +++++------ .../web-core/lib/components/menu/MenuList.vue | 20 +++++------ .../web-core/lib/components/tab/TabItem.vue | 7 ++-- .../web-core/lib/components/tab/TabList.vue | 14 +++----- .../lib/components/ui/button/UiButton.vue | 28 ++++++--------- .../lib/components/ui/checkbox/UiCheckbox.vue | 24 ++++++------- .../lib/composables/disabled.composable.ts | 15 ++++++++ @xen-orchestra/web-core/lib/context.ts | 10 ------ .../web-core/lib/utils/injection-keys.util.ts | 2 ++ 18 files changed, 122 insertions(+), 159 deletions(-) create mode 100644 @xen-orchestra/web-core/lib/composables/disabled.composable.ts delete mode 100644 @xen-orchestra/web-core/lib/context.ts diff --git a/@xen-orchestra/lite/src/components/RouterTab.vue b/@xen-orchestra/lite/src/components/RouterTab.vue index ba35972099c..95a3615fe59 100644 --- a/@xen-orchestra/lite/src/components/RouterTab.vue +++ b/@xen-orchestra/lite/src/components/RouterTab.vue @@ -13,17 +13,13 @@ diff --git a/@xen-orchestra/lite/src/components/form/FormCheckbox.vue b/@xen-orchestra/lite/src/components/form/FormCheckbox.vue index 313c2a1739a..efd033995d7 100644 --- a/@xen-orchestra/lite/src/components/form/FormCheckbox.vue +++ b/@xen-orchestra/lite/src/components/form/FormCheckbox.vue @@ -16,23 +16,19 @@