feat: enhance post management with pagination, search, and order functionality
All checks were successful
Push to Helm Chart Repository / build (push) Successful in 11s

- Added search input for filtering posts by keywords.
- Implemented pagination controls for navigating through posts.
- Introduced order selector for sorting posts based on various criteria.
- Enhanced post item display with additional metrics (view count, like count, comment count).
- Added dropdown menu for post actions (edit, view, toggle privacy, delete).
- Integrated double confirmation for delete action.
- Updated user profile to support background image upload.
- Improved user security settings with better layout and validation.
- Refactored auth context to use useCallback for logout function.
- Added command palette component for improved command execution.
- Introduced popover component for better UI interactions.
- Implemented debounce hooks for optimized state updates.
- Updated localization files with new keys for improved internationalization.
- Added tailwind configuration for styling.
This commit is contained in:
2025-09-25 00:51:29 +08:00
parent 59b68613cd
commit 64b1c54911
44 changed files with 2790 additions and 474 deletions

View File

@ -2,11 +2,11 @@
import { getDashboard, DashboardResp } from "@/api/admin"
import { Card, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Eye, MessageCircle, Newspaper, Users } from "lucide-react"
import { JSX, useEffect, useState } from "react"
import { useEffect, useState } from "react"
import { toast } from "sonner"
import { path } from "../data"
import Link from "next/link"
import { IconType } from "@/types/icon"
import { consolePath } from "@/hooks/use-route"
export function Dashboard() {
return (
@ -22,25 +22,25 @@ function DataOverview() {
key: "totalPosts",
label: "Total Posts",
icon: Newspaper,
url: path.post
url: consolePath.post
},
{
key: "totalUsers",
label: "Total Users",
icon: Users,
url: path.user
url: consolePath.user
},
{
key: "totalComments",
label: "Total Comments",
icon: MessageCircle,
url: path.comment
url: consolePath.comment
},
{
key: "totalViews",
label: "Total Views",
icon: Eye,
url: path.file
url: consolePath.file
},
]