- organised file structure for dashboard

This commit is contained in:
2025-12-02 14:10:06 +00:00
parent 1810fc04b5
commit 2a4afc7eae
13 changed files with 28 additions and 32 deletions

View File

@@ -0,0 +1,23 @@
import { faHardDrive } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
type StatusItemProps = {
statusInfoItem: string;
description: string;
};
const StatusItemCPU = ({ statusInfoItem, description }: StatusItemProps) => {
return (
<div className="p-3 border border-gray-700 rounded-lg hover:bg-[#233241]">
<div className="flex flex-row gap-2 items-center">
<span className="font-bold text-xl bg-slate-700 p-1 px-2 rounded-md">
<FontAwesomeIcon icon={faHardDrive} />
</span>
<p className="text-lg">{statusInfoItem}</p>
</div>
<p className="text-slate-400">{description}</p>
</div>
);
};
export default StatusItemCPU;

View File

@@ -0,0 +1,31 @@
import { faClock } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
type StatusItemProps = {
statusInfoItem: string;
description: string;
};
const StatusItemLocal = ({ statusInfoItem, description }: StatusItemProps) => {
const humanReadable = (string: string) => {
if (description.toLowerCase().includes("local")) {
const text = string.slice(0, statusInfoItem.length - 5);
return text;
}
};
return (
<div className="p-3 border border-gray-700 rounded-lg hover:bg-[#233241]">
<div className="flex flex-row gap-2 items-center">
<span className="font-bold text-xl bg-slate-700 p-1 px-2 rounded-md">
<FontAwesomeIcon icon={faClock} />
</span>
<p className="text-lg">{description.toLowerCase().includes("local") && humanReadable(statusInfoItem)}</p>
</div>
<p className="text-slate-400">{description}</p>
</div>
);
};
export default StatusItemLocal;

View File

@@ -0,0 +1,24 @@
import { faMicrochip } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
type StatusItemProps = {
statusInfoItem: string;
description: string;
};
const StatusItemThreads = ({ statusInfoItem, description }: StatusItemProps) => {
return (
<div className="p-3 border border-gray-700 rounded-lg hover:bg-[#233241]">
<div className="flex flex-row gap-2 items-center">
<span className="font-bold text-xl bg-slate-700 p-1 px-2 rounded-md">
<FontAwesomeIcon icon={faMicrochip} />
</span>
<p className="text-lg">{statusInfoItem}</p>
</div>
<p className="text-slate-400">{description}</p>
</div>
);
};
export default StatusItemThreads;

View File

@@ -0,0 +1,32 @@
import { faClock } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
type StatusItemProps = {
statusInfoItem: string;
description: string;
};
const StatusItemUTC = ({ statusInfoItem, description }: StatusItemProps) => {
const humanReadable = (string: string) => {
if (description.includes("UTC")) {
const text = string.slice(0, statusInfoItem.length - 3);
return text;
}
};
return (
<div className="p-3 border border-gray-700 rounded-lg hover:bg-[#233241]">
<div className="flex flex-row gap-2 items-center">
<span className="font-bold text-xl bg-slate-700 p-1 px-2 rounded-md">
<FontAwesomeIcon icon={faClock} />
</span>
<p className="text-lg">{description.toLowerCase().includes("utc") && humanReadable(statusInfoItem)}</p>
</div>
<p className="text-slate-400">{description}</p>
</div>
);
};
export default StatusItemUTC;