From c32ee4dfb514f3b89e16d1df81d91000bfe97d08 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 25 Oct 2025 16:59:20 +0200 Subject: [PATCH] consistent design between dashboard and device tables --- interface/src/app/main/Dashboard.tsx | 4 +- interface/src/app/main/Devices.tsx | 113 ++++++++++++++++----------- 2 files changed, 68 insertions(+), 49 deletions(-) diff --git a/interface/src/app/main/Dashboard.tsx b/interface/src/app/main/Dashboard.tsx index 1cb5aa9dd..fa318bbac 100644 --- a/interface/src/app/main/Dashboard.tsx +++ b/interface/src/app/main/Dashboard.tsx @@ -206,7 +206,7 @@ const Dashboard = memo(() => { // if its a device (parent node) and has entities if (di.nodes?.length) { return ( - +   {showType(di.n, di.t)}  ({di.nodes?.length}) @@ -312,7 +312,7 @@ const Dashboard = memo(() => { flexDirection="column" sx={{ borderRadius: 1, - border: '1px solid grey' + border: '1px solid rgb(65, 65, 65)' }} > { useTheme([ common_theme, { + BaseRow: ` + font-size: 15px; + .td { + height: 28px; + } + `, Table: ` --data-table-library_grid-template-columns: repeat(1, minmax(0, 1fr)) 130px; `, @@ -184,9 +190,12 @@ const Devices = memo(() => { padding: 8px; `, Row: ` - font-weight: bold; + &:nth-of-type(odd) .td { + background-color: #303030; + }, &:hover .td { background-color: #177ac9; + }, ` } ]), @@ -526,55 +535,65 @@ const Devices = memo(() => { const renderCoreData = () => ( <> - - {!coreData.connected && ( - - )} + + {!coreData.connected && ( + + )} - {coreData.connected && ( - - {(tableList: Device[]) => ( - <> -
- - {LL.DESCRIPTION()} - {LL.TYPE(0)} - -
- - {tableList.length === 0 && ( - - )} - {tableList.map((device: Device) => ( - - - -    - {device.n} - -   ({device.e}) - - - {device.tn} - - ))} - - - )} -
- )} -
+ {coreData.connected && ( + + {(tableList: Device[]) => ( + <> +
+ + {LL.DESCRIPTION()} + {LL.TYPE(0)} + +
+ + {tableList.length === 0 && ( + + )} + {tableList.map((device: Device) => ( + + + +    + {device.n} + +   ({device.e}) + + + {device.tn} + + ))} + + + )} +
+ )} +
+ );