From 0117cd5faa44fa78bb013ad1332b7c15123c7e2d Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Wed, 15 May 2024 11:11:50 +0300 Subject: [PATCH 1/6] - feat: Support children in table headers type - feat: Add public IP header in farms page --- packages/playground/src/types/index.ts | 8 +++++++- packages/playground/src/views/farms.vue | 15 ++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/playground/src/types/index.ts b/packages/playground/src/types/index.ts index 2532729dd1..fb5ae86cce 100644 --- a/packages/playground/src/types/index.ts +++ b/packages/playground/src/types/index.ts @@ -87,7 +87,13 @@ export interface Flist { entryPoint: string; } -export type VDataTableHeader = { title: string; key: string; sortable?: boolean; [key: string]: any }[]; +export type VDataTableHeader = { + title: string; + key: string; + sortable?: boolean; + children?: VDataTableHeader; + [key: string]: any; +}[]; export enum ProjectName { Kubernetes = "Kubernetes", diff --git a/packages/playground/src/views/farms.vue b/packages/playground/src/views/farms.vue index d7afa9b96f..bdede63628 100644 --- a/packages/playground/src/views/farms.vue +++ b/packages/playground/src/views/farms.vue @@ -206,16 +206,13 @@ const headers: VDataTableHeader = [ { title: "ID", key: "farmId", sortable: false }, { title: "Name", key: "name", sortable: false }, { - title: "Total Public IPs", - key: "totalPublicIp", - align: "start", - sortable: false, - }, - { - title: "Available Public IPs", - key: "freePublicIp", - align: "start", + title: "Public IPs", + key: "publicIps", sortable: false, + children: [ + { title: "Total", key: "totalPublicIp", sortable: false }, + { title: "Available", key: "freePublicIp", sortable: false }, + ], }, { title: "Certification Type", From be6f0d9668882f614ac2a74b198b702b7e6f132d Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Wed, 15 May 2024 12:13:06 +0300 Subject: [PATCH 2/6] - chore: rename global.css into global.scss to avoid multi nested css conditions - style: add borders to vuetify tables to improve it's readablility --- .../src/{global.css => global.scss} | 37 +++++++++++++++++++ packages/playground/src/main.ts | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) rename packages/playground/src/{global.css => global.scss} (74%) diff --git a/packages/playground/src/global.css b/packages/playground/src/global.scss similarity index 74% rename from packages/playground/src/global.css rename to packages/playground/src/global.scss index b8529a0527..c006f4beca 100644 --- a/packages/playground/src/global.css +++ b/packages/playground/src/global.scss @@ -148,3 +148,40 @@ a { border-radius: 4px; border-left: 5px solid #1c81dd; } + +/* Update tables styles */ +table { + thead { + tr { + th { + border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity)); + + &:not(.v-data-table__th--sorted) i { + opacity: 0.1 !important; + } + } + + &:first-of-type th { + &:first-of-type { + border-left: thin solid rgba(var(--v-border-color), var(--v-border-opacity)); + } + + border-top: thin solid rgba(var(--v-border-color), var(--v-border-opacity)); + } + } + } + + tbody tr { + td { + border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity)); + + &:first-of-type { + border-left: thin solid rgba(var(--v-border-color), var(--v-border-opacity)); + } + } + + &:last-of-type td { + border-bottom: thin solid rgba(var(--v-border-color), var(--v-border-opacity)); + } + } +} diff --git a/packages/playground/src/main.ts b/packages/playground/src/main.ts index 3356896402..ac76b55e4d 100644 --- a/packages/playground/src/main.ts +++ b/packages/playground/src/main.ts @@ -1,5 +1,5 @@ import "mosha-vue-toastify/dist/style.css"; -import "./global.css"; +import "./global.scss"; import { createPinia } from "pinia"; import { createApp } from "vue"; From 9b02a63b2e3ec69f42caf9c044400f1a8a5aec67 Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Wed, 15 May 2024 12:24:32 +0300 Subject: [PATCH 3/6] - style: improve how table looks when no items found - style: add mb-5 to loader and no data message --- .../playground/src/components/list_table.vue | 4 ++-- packages/playground/src/global.scss | 22 ++++++------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/playground/src/components/list_table.vue b/packages/playground/src/components/list_table.vue index fdc08adc0f..aa57732f04 100644 --- a/packages/playground/src/components/list_table.vue +++ b/packages/playground/src/components/list_table.vue @@ -55,7 +55,7 @@