From 57e11ee16e322e6b9a76e607f15a7db4598a5b14 Mon Sep 17 00:00:00 2001 From: amiraabouhadid Date: Wed, 13 Dec 2023 12:52:44 +0200 Subject: [PATCH 1/4] move farm dialog to farms to ensure consisitent closing, delete unnecessary farms dialog component --- .../playground/src/components/farm_dialog.vue | 88 ------------------- packages/playground/src/views/farms.vue | 53 +++++++---- 2 files changed, 36 insertions(+), 105 deletions(-) delete mode 100644 packages/playground/src/components/farm_dialog.vue diff --git a/packages/playground/src/components/farm_dialog.vue b/packages/playground/src/components/farm_dialog.vue deleted file mode 100644 index 1377146cee..0000000000 --- a/packages/playground/src/components/farm_dialog.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - diff --git a/packages/playground/src/views/farms.vue b/packages/playground/src/views/farms.vue index de71331249..059e08e53c 100644 --- a/packages/playground/src/views/farms.vue +++ b/packages/playground/src/views/farms.vue @@ -30,13 +30,35 @@ - + + + +
+ + mdi-close + +
+
+ + + + +
+
@@ -52,12 +74,12 @@ import { inputsInitializer } from "@/utils/filter_farms"; import { getAllFarms, getFarmQueries } from "@/utils/get_farms"; const loading = ref(false); const farms = ref(); -const isDialogOpened = ref(false); + const selectedFarm = ref(); const filterFarmInputs = ref(inputsInitializer()); const size = ref(10); const page = ref(1); - +const dialog = ref(false); const sortBy = ref([{ key: "", order: undefined }]); const filterOptions = ref({ size: size.value, @@ -188,11 +210,7 @@ const openSheet = (_e: any, { item }: any) => { }; const openDialog = (item: Farm) => { selectedFarm.value = item; - isDialogOpened.value = true; -}; - -const closeDialog = () => { - isDialogOpened.value = false; + dialog.value = true; }; const headers: VDataTableHeader = [ @@ -229,14 +247,15 @@ const headers: VDataTableHeader = [ import type { FarmsQuery } from "@threefold/gridproxy_client"; import Filters from "@/components/filter.vue"; +import FarmDetailsCard from "@/components/node_details_cards/farm_details_card.vue"; +import TwinDetailsCard from "@/components/node_details_cards/twin_details_card.vue"; import { createCustomToast, ToastType } from "@/utils/custom_toast"; - -import FarmDialog from "../components/farm_dialog.vue"; export default { name: "Farms", components: { - FarmDialog, Filters, + FarmDetailsCard, + TwinDetailsCard, }, }; From 1075346010523abb3ded886d0f6e919d1062186b Mon Sep 17 00:00:00 2001 From: amiraabouhadid Date: Thu, 14 Dec 2023 11:39:48 +0200 Subject: [PATCH 2/4] make close button consistent with nodes dialog --- packages/playground/src/views/farms.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/playground/src/views/farms.vue b/packages/playground/src/views/farms.vue index 059e08e53c..4f1dab3b35 100644 --- a/packages/playground/src/views/farms.vue +++ b/packages/playground/src/views/farms.vue @@ -32,10 +32,10 @@ - -
+ +
- mdi-close + mdi-close
From 0194358810d658e3934aa73ef1f1a9380eb12bd8 Mon Sep 17 00:00:00 2001 From: amiraabouhadid Date: Thu, 14 Dec 2023 14:54:01 +0200 Subject: [PATCH 3/4] reduce toolbar height --- packages/playground/src/views/farms.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playground/src/views/farms.vue b/packages/playground/src/views/farms.vue index 4f1dab3b35..03ec07fa42 100644 --- a/packages/playground/src/views/farms.vue +++ b/packages/playground/src/views/farms.vue @@ -32,7 +32,7 @@ - +
mdi-close From aa683996ba5dcec1626db963ac7763877cc81ec2 Mon Sep 17 00:00:00 2001 From: amiraabouhadid Date: Thu, 14 Dec 2023 16:03:22 +0200 Subject: [PATCH 4/4] remove primary color --- packages/playground/src/views/farms.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playground/src/views/farms.vue b/packages/playground/src/views/farms.vue index 03ec07fa42..dc14adb155 100644 --- a/packages/playground/src/views/farms.vue +++ b/packages/playground/src/views/farms.vue @@ -32,7 +32,7 @@ - +
mdi-close