diff --git a/components/cards/dashboard/git/GiteaProfileCard.tsx b/components/cards/dashboard/git/GiteaProfileCard.tsx index 8f4df14..045ef33 100644 --- a/components/cards/dashboard/git/GiteaProfileCard.tsx +++ b/components/cards/dashboard/git/GiteaProfileCard.tsx @@ -1,60 +1,89 @@ -"use client"; +"use client" -import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card"; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; -import { Badge } from "@/components/ui/badge"; -import { Users, Clock, User } from "lucide-react"; +import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card" +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { Badge } from "@/components/ui/badge" +import { Users, Clock, User, Mail } from "lucide-react" +import { Separator } from "@/components/ui/separator" interface DashboardState { - gitUser: string; - gitAvatar?: string; - gitLastLogin?: string; - gitFollowerCt: number; - gitFollowingCt: number; - gitIsAdmin: boolean; - gitEmail?: string; + gitUser: string + gitAvatar?: string + gitLastLogin?: string + gitFollowerCt: number + gitFollowingCt: number + gitIsAdmin: boolean + gitEmail?: string } export function GiteaProfileCard({ dashboardState }: { dashboardState: DashboardState }) { const convDate = (dateStr: string) => { - const date = new Date(dateStr); - return date.toLocaleString(); + const date = new Date(dateStr) + return date.toLocaleString() } return ( - - - Profile - An overview of your LibreCloud Git account + + +
+ Profile + {dashboardState.gitIsAdmin && ( + + Admin + + )} +
- -
- - - - + +
+ + + + -
-

- {dashboardState.gitUser} - {dashboardState.gitIsAdmin && Admin} -

-
- - {dashboardState.gitFollowerCt} followers - - - {dashboardState.gitFollowingCt} following - +
+

{dashboardState.gitUser}

+
+
+
+ +
+
+

{dashboardState.gitFollowerCt}

+

Followers

+
+
+
+
+ +
+
+

{dashboardState.gitFollowingCt}

+

Following

+
+
-
- - Last login: {dashboardState.gitLastLogin === "Never" ? "Never" : (dashboardState.gitLastLogin && convDate(dashboardState.gitLastLogin)) || "N/A"} + +
+ + + Last login:{" "} + {dashboardState.gitLastLogin === "Never" + ? "Never" + : (dashboardState.gitLastLogin && convDate(dashboardState.gitLastLogin)) || "N/A"} + +
+
+ + + Email: {dashboardState.gitEmail || "N/A"} +
) -} \ No newline at end of file +} + diff --git a/components/pages/dashboard/Footer.tsx b/components/pages/dashboard/Footer.tsx index 877ce64..9dcfc25 100644 --- a/components/pages/dashboard/Footer.tsx +++ b/components/pages/dashboard/Footer.tsx @@ -1,6 +1,7 @@ "use client" -import {useEffect, useState} from "react" +import { useEffect, useState } from "react" +import { TbNoCopyright } from "react-icons/tb"; export function Footer() { const [renderTime, setRenderTime] = useState(null) @@ -18,11 +19,23 @@ export function Footer() { return ( ) } -