From e307d34e8ba599c5cb98bb029ff820437ea3f29f Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Mon, 28 Apr 2025 14:00:17 +0200 Subject: [PATCH] Fix(app/machines): fix css styling of machine list overview --- .../app/src/components/MachineListItem.tsx | 119 ++++++++++-------- pkgs/webview-ui/app/src/layout/header.tsx | 6 +- .../app/src/routes/machines/list.tsx | 11 +- 3 files changed, 77 insertions(+), 59 deletions(-) diff --git a/pkgs/webview-ui/app/src/components/MachineListItem.tsx b/pkgs/webview-ui/app/src/components/MachineListItem.tsx index a1efbf3bc..edfb8df1b 100644 --- a/pkgs/webview-ui/app/src/components/MachineListItem.tsx +++ b/pkgs/webview-ui/app/src/components/MachineListItem.tsx @@ -7,6 +7,8 @@ import { A, useNavigate } from "@solidjs/router"; import { RndThumbnail } from "./noiseThumbnail"; import Icon from "./icon"; import { Filter } from "../routes/machines"; +import { Typography } from "./Typography"; +import { Button } from "./button"; type MachineDetails = SuccessQuery<"list_inventory_machines">["data"][string]; @@ -108,26 +110,77 @@ export const MachineListItem = (props: MachineListItemProps) => { setUpdating(false); }; return ( -
+
-
+
-

+ {name} -

+
-
- {(d) => d()?.description} +
+
+ + + + + + {(d) => d()?.description || "no description"} + + +
+ +
+ } + > +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
-
+ {/*
{(d) => ( <> @@ -163,47 +216,7 @@ export const MachineListItem = (props: MachineListItemProps) => { )} -
-
-
- */}
diff --git a/pkgs/webview-ui/app/src/layout/header.tsx b/pkgs/webview-ui/app/src/layout/header.tsx index 922f6bc3a..a69b0a9cb 100644 --- a/pkgs/webview-ui/app/src/layout/header.tsx +++ b/pkgs/webview-ui/app/src/layout/header.tsx @@ -9,7 +9,7 @@ interface HeaderProps { } export const Header = (props: HeaderProps) => { return ( -
+
{props.showBack && } @@ -23,9 +23,7 @@ export const Header = (props: HeaderProps) => { {props.title}
-
- {props.toolbar} -
+
{props.toolbar}
); }; diff --git a/pkgs/webview-ui/app/src/routes/machines/list.tsx b/pkgs/webview-ui/app/src/routes/machines/list.tsx index 502f846b1..78b441a86 100644 --- a/pkgs/webview-ui/app/src/routes/machines/list.tsx +++ b/pkgs/webview-ui/app/src/routes/machines/list.tsx @@ -118,8 +118,15 @@ export const MachineListView: Component = () => { />
-
- +
+
+ +
{(tag) => (