mirror of
https://github.com/csehviktor/status-monitor.git
synced 2026-04-28 16:27:34 +02:00
improve home page
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"lucide-react": "^0.525.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^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=="],
|
"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=="],
|
"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=="],
|
"merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"lucide-react": "^0.525.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0"
|
"react-dom": "^19.1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
export type AgentOverviewCardProps = {
|
||||||
|
title: string;
|
||||||
|
icon: {
|
||||||
|
ref: React.ReactNode;
|
||||||
|
color: string;
|
||||||
|
bgColor: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export function AgentOverviewCard({
|
||||||
|
props,
|
||||||
|
}: {
|
||||||
|
props: AgentOverviewCardProps;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div className="bg-[#111111] border border-[#262626] rounded-lg p-6">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-gray-400 uppercase tracking-wider">
|
||||||
|
{props.title}
|
||||||
|
</p>
|
||||||
|
<p className="text-2xl font-bold text-white">0</p>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="w-12 h-12 rounded-lg flex items-center justify-center"
|
||||||
|
style={{
|
||||||
|
color: props.icon.color,
|
||||||
|
backgroundColor: props.icon.bgColor,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{props.icon.ref}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { Zap } from "lucide-react";
|
||||||
|
|
||||||
export type HeaderProps = {
|
export type HeaderProps = {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle: string;
|
subtitle: string;
|
||||||
@@ -7,24 +9,11 @@ export type HeaderProps = {
|
|||||||
|
|
||||||
export function Header({ props }: { props: HeaderProps }) {
|
export function Header({ props }: { props: HeaderProps }) {
|
||||||
return (
|
return (
|
||||||
<header className="bg-[#0f0f0f] border-b border-[#0e0e0e]">
|
<header className="bg-[#111111] border-b border-[#111111]">
|
||||||
<div className="max-w-7xl mx-auto py-4 flex justify-between items-center">
|
<div className="max-w-7xl mx-auto py-4 flex justify-between items-center">
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<div className="w-11 h-11 bg-pink-300 text-pink-500 p-1 rounded-lg flex">
|
<div className="w-11 h-11 text-yellow-500 flex items-center justify-center">
|
||||||
<svg
|
<Zap className="w-9 h-9" />
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="3"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
className="lucide lucide-chart-no-axes-column-increasing-icon lucide-chart-no-axes-column-increasing"
|
|
||||||
>
|
|
||||||
<line x1="12" x2="12" y1="20" y2="10" />
|
|
||||||
<line x1="18" x2="18" y1="20" y2="4" />
|
|
||||||
<line x1="6" x2="6" y1="20" y2="16" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-xl font-bold">{props.title}</h1>
|
<h1 className="text-xl font-bold">{props.title}</h1>
|
||||||
|
|||||||
+43
-2
@@ -1,4 +1,6 @@
|
|||||||
|
import { AgentOverviewCard } from "@/components/AgentCard";
|
||||||
import { Header } from "@/components/Header";
|
import { Header } from "@/components/Header";
|
||||||
|
import { Box } from "lucide-react";
|
||||||
|
|
||||||
export function HomePage() {
|
export function HomePage() {
|
||||||
return (
|
return (
|
||||||
@@ -11,8 +13,47 @@ export function HomePage() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<main className="max-w-7xl mx-auto py-8">
|
<main className="max-w-7xl mx-auto py-8">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
|
||||||
<h1>helo vilag</h1>
|
<AgentOverviewCard
|
||||||
|
props={{
|
||||||
|
title: "total agents",
|
||||||
|
icon: {
|
||||||
|
ref: <Box />,
|
||||||
|
color: "rgb(96, 165, 250)",
|
||||||
|
bgColor: "rgba(59, 130, 246, 0.2)",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AgentOverviewCard
|
||||||
|
props={{
|
||||||
|
title: "online",
|
||||||
|
icon: {
|
||||||
|
ref: (
|
||||||
|
<div className="w-3 h-3 bg-green-500 rounded-full animate-pulse-slow" />
|
||||||
|
),
|
||||||
|
color: "rgb(34, 197, 94)",
|
||||||
|
bgColor: "rgba(34, 197, 94, 0.2)",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AgentOverviewCard
|
||||||
|
props={{
|
||||||
|
title: "offline",
|
||||||
|
icon: {
|
||||||
|
ref: (
|
||||||
|
<div className="w-3 h-3 bg-red-500 rounded-full animate-pulse-slow" />
|
||||||
|
),
|
||||||
|
color: "rgb(239, 68, 68)",
|
||||||
|
bgColor: "rgba(239, 68, 68, 0.2)",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mb-6">
|
||||||
|
<h2 className="text-xl font-semibold mb-4">Agents</h2>
|
||||||
|
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user