Skip to content

Commit e796a8d

Browse files
CopilotJustinhSE
andauthored
feat: gamification badges, engagement score, and admin dashboard
Agent-Logs-Url: https://github.com/Debugging-Disciples/community-software/sessions/f026042a-bea0-48c5-831e-d12e201e7607 Co-authored-by: JustinhSE <84724234+JustinhSE@users.noreply.github.com>
1 parent 841c401 commit e796a8d

7 files changed

Lines changed: 845 additions & 16 deletions

File tree

‎app/admin/page.tsx‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { redirect } from "next/navigation";
2+
import { getServerSession } from "next-auth";
3+
import { authOptions } from "@/lib/auth";
4+
import { AdminDashboardClient } from "@/components/AdminDashboardClient";
5+
6+
export default async function AdminPage() {
7+
const session = await getServerSession(authOptions);
8+
9+
if (!session) {
10+
redirect("/");
11+
}
12+
13+
// TODO: Add role-based authorization once user roles are stored in the session.
14+
// Only users with an "admin" or "Leader" role should be allowed to access this page.
15+
// Example: if (session.user.role !== "admin") redirect("/dashboard");
16+
17+
return <AdminDashboardClient session={session} />;
18+
}

‎app/globals.css‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,50 @@ body {
2424
text-wrap: balance;
2525
}
2626
}
27+
28+
@keyframes flame-pulse {
29+
0%, 100% {
30+
filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.8)) drop-shadow(0 0 12px rgba(6, 182, 212, 0.4));
31+
transform: scale(1);
32+
}
33+
50% {
34+
filter: drop-shadow(0 0 10px rgba(6, 182, 212, 1)) drop-shadow(0 0 20px rgba(6, 182, 212, 0.6));
35+
transform: scale(1.08);
36+
}
37+
}
38+
39+
@keyframes gradient-shift {
40+
0% {
41+
background-position: 0% 50%;
42+
}
43+
50% {
44+
background-position: 100% 50%;
45+
}
46+
100% {
47+
background-position: 0% 50%;
48+
}
49+
}
50+
51+
@keyframes counter-up {
52+
from {
53+
opacity: 0;
54+
transform: translateY(8px);
55+
}
56+
to {
57+
opacity: 1;
58+
transform: translateY(0);
59+
}
60+
}
61+
62+
.badge-flame {
63+
animation: flame-pulse 2s ease-in-out infinite;
64+
}
65+
66+
.badge-gradient-animated {
67+
background-size: 200% 200% !important;
68+
animation: gradient-shift 3s ease infinite;
69+
}
70+
71+
.engagement-score-value {
72+
animation: counter-up 0.6s ease-out forwards;
73+
}

0 commit comments

Comments
 (0)