From fa7bce9c034826a33841727bf16b717ee8eb9039 Mon Sep 17 00:00:00 2001 From: csehviktor Date: Thu, 3 Jul 2025 08:17:11 +0200 Subject: [PATCH] improve home page --- ui/bun.lock | 3 +++ ui/package.json | 1 + ui/src/components/AgentCard.tsx | 36 ++++++++++++++++++++++++++ ui/src/components/Header.tsx | 21 ++++----------- ui/src/pages/home.tsx | 45 +++++++++++++++++++++++++++++++-- 5 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 ui/src/components/AgentCard.tsx diff --git a/ui/bun.lock b/ui/bun.lock index 76b0669..467bb61 100644 --- a/ui/bun.lock +++ b/ui/bun.lock @@ -4,6 +4,7 @@ "": { "name": "ui", "dependencies": { + "lucide-react": "^0.525.0", "react": "^19.1.0", "react-dom": "^19.1.0", }, @@ -442,6 +443,8 @@ "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + "lucide-react": ["lucide-react@0.525.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Tm1txJ2OkymCGkvwoHt33Y2JpN5xucVq1slHcgE6Lk0WjDfjgKWor5CdVER8U6DvcfMwh4M8XxmpTiyzfmfDYQ=="], + "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], diff --git a/ui/package.json b/ui/package.json index c93437e..6842c43 100644 --- a/ui/package.json +++ b/ui/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "lucide-react": "^0.525.0", "react": "^19.1.0", "react-dom": "^19.1.0" }, diff --git a/ui/src/components/AgentCard.tsx b/ui/src/components/AgentCard.tsx new file mode 100644 index 0000000..6cbc09b --- /dev/null +++ b/ui/src/components/AgentCard.tsx @@ -0,0 +1,36 @@ +export type AgentOverviewCardProps = { + title: string; + icon: { + ref: React.ReactNode; + color: string; + bgColor: string; + }; +}; + +export function AgentOverviewCard({ + props, +}: { + props: AgentOverviewCardProps; +}) { + return ( +
+
+
+

+ {props.title} +

+

0

+
+
+ {props.icon.ref} +
+
+
+ ); +} diff --git a/ui/src/components/Header.tsx b/ui/src/components/Header.tsx index f19a3ca..b2b86eb 100644 --- a/ui/src/components/Header.tsx +++ b/ui/src/components/Header.tsx @@ -1,3 +1,5 @@ +import { Zap } from "lucide-react"; + export type HeaderProps = { title: string; subtitle: string; @@ -7,24 +9,11 @@ export type HeaderProps = { export function Header({ props }: { props: HeaderProps }) { return ( -
+
-
- - - - - +
+

{props.title}

diff --git a/ui/src/pages/home.tsx b/ui/src/pages/home.tsx index 519f210..92495f2 100644 --- a/ui/src/pages/home.tsx +++ b/ui/src/pages/home.tsx @@ -1,4 +1,6 @@ +import { AgentOverviewCard } from "@/components/AgentCard"; import { Header } from "@/components/Header"; +import { Box } from "lucide-react"; export function HomePage() { return ( @@ -11,8 +13,47 @@ export function HomePage() { }} />
-
-

helo vilag

+
+ , + color: "rgb(96, 165, 250)", + bgColor: "rgba(59, 130, 246, 0.2)", + }, + }} + /> + + ), + color: "rgb(34, 197, 94)", + bgColor: "rgba(34, 197, 94, 0.2)", + }, + }} + /> + + ), + color: "rgb(239, 68, 68)", + bgColor: "rgba(239, 68, 68, 0.2)", + }, + }} + /> +
+ +
+

Agents

+ +