diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 9defbe3..57fbf15 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -39,7 +39,7 @@ server { # Internal MeshCentral hop to avoid upstream TLS handshake instability. set $meshserver meshcentral:8082; # Public host MeshCentral expects in Host header. - set $meshhost soict-overleaf.tailc51e09.ts.net; + set $meshhost soict-overleaf.tailc51e09.ts.net:8443 root /usr/share/nginx/html; index index.html index.htm; diff --git a/src/components/grids/device-grid.tsx b/src/components/grids/device-grid.tsx index adb773e..9e366c4 100644 --- a/src/components/grids/device-grid.tsx +++ b/src/components/grids/device-grid.tsx @@ -77,28 +77,56 @@ export function DeviceGrid({ ); }; - const gridTemplateColumns = "repeat(auto-fit, minmax(6rem, 6rem))"; + const columnsPerSide = 4; + const chunkRows = (items: T[], size: number) => { + const rows: T[][] = []; + for (let i = 0; i < items.length; i += size) { + rows.push(items.slice(i, i + size)); + } + return rows; + }; + + const leftRows = chunkRows(leftDevices, columnsPerSide); + const rightRows = chunkRows(rightDevices, columnsPerSide); + const totalRows = Math.max(leftRows.length, rightRows.length); + + const renderPlaceholder = (key: string) => ( +