-
+
diff --git a/src/pages/home/components/stats-card.tsx b/src/pages/home/components/stats-card.tsx
index cf35b47..2de1591 100644
--- a/src/pages/home/components/stats-card.tsx
+++ b/src/pages/home/components/stats-card.tsx
@@ -30,7 +30,7 @@ const StatsCard = ({
{typeof value === "undefined" ? "..." : value}
)}
-
{title}
+
{title}
);
diff --git a/src/pages/home/page.tsx b/src/pages/home/page.tsx
index 98cfef5..e1d04d2 100644
--- a/src/pages/home/page.tsx
+++ b/src/pages/home/page.tsx
@@ -10,17 +10,25 @@ import {
HardDrive,
HardDriveUpload,
Leaf,
+ PieChart,
} from "lucide-react";
-import { cn, ucfirst } from "@/lib/utils";
+import { cn, readableBytes, ucfirst } from "@/lib/utils";
+import { useBuckets } from "../buckets/hooks";
+import { useMemo } from "react";
const HomePage = () => {
const { data: health } = useNodesHealth();
+ const { data: buckets } = useBuckets();
+
+ const totalUsage = useMemo(() => {
+ return buckets?.reduce((acc, bucket) => acc + bucket.bytes, 0);
+ }, [buckets]);
return (
-
+
{
icon={FileCheck}
value={health?.partitionsAllOk}
/>
+
);
diff --git a/src/pages/keys/page.tsx b/src/pages/keys/page.tsx
index fa04764..da5fa79 100644
--- a/src/pages/keys/page.tsx
+++ b/src/pages/keys/page.tsx
@@ -28,7 +28,7 @@ const KeysPage = () => {
-
+
diff --git a/src/stores/app-store.ts b/src/stores/app-store.ts
new file mode 100644
index 0000000..44bd0a2
--- /dev/null
+++ b/src/stores/app-store.ts
@@ -0,0 +1,25 @@
+import { Themes } from "@/app/themes";
+import { createStore } from "zustand";
+import { persist } from "zustand/middleware";
+
+type AppState = {
+ theme: Themes;
+};
+
+const store = createStore(
+ persist
(
+ () => ({
+ theme: "pastel",
+ }),
+ {
+ name: "appdata",
+ }
+ )
+);
+
+const appStore = {
+ ...store,
+ setTheme: (theme: AppState["theme"]) => store.setState({ theme }),
+};
+
+export default appStore;
diff --git a/tailwind.config.js b/tailwind.config.js
index c2285a9..1a3792b 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -11,6 +11,6 @@ export default {
},
plugins: [require("daisyui")],
daisyui: {
- themes: ["light", "dark", "cupcake", "pastel", "dracula"],
+ themes: require("./src/app/themes").themes,
},
};