feat(ui): refine dashboard management pages
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { EmptyState } from "@/components/ui/empty-state"
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -17,7 +18,7 @@ import { useMyShop } from "@/lib/hooks/use-my-shop"
|
||||
import { notifyInfo, notifySuccess } from "@/lib/toast"
|
||||
import type { Player, PlayerService } from "@/lib/types"
|
||||
import { useAuthStore } from "@/store/auth"
|
||||
import { Edit, Plus, Trash2 } from "lucide-react"
|
||||
import { AlertCircle, Edit, Plus, Trash2 } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useCallback, useEffect, useMemo, useState } from "react"
|
||||
|
||||
@@ -109,7 +110,7 @@ export default function ServicesPage() {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Card className="hover:shadow-card-hover">
|
||||
<Card className="border-border/80 shadow-sm">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-base">已发布的服务</CardTitle>
|
||||
</CardHeader>
|
||||
@@ -128,20 +129,30 @@ export default function ServicesPage() {
|
||||
<TableBody>
|
||||
{loading || (currentRole === "owner" && shopLoading) ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={6} className="text-center text-sm text-muted-foreground">
|
||||
加载中...
|
||||
<TableCell colSpan={6} className="py-6">
|
||||
<EmptyState title="服务加载中" className="min-h-[180px]" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : currentRole === "owner" && shopError ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={6} className="text-center text-sm text-muted-foreground">
|
||||
{shopError}
|
||||
<TableCell colSpan={6} className="py-6">
|
||||
<EmptyState
|
||||
title="店铺信息加载失败"
|
||||
description={shopError}
|
||||
icon={AlertCircle}
|
||||
className="min-h-[180px]"
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : scopedServices.length === 0 ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={6} className="text-center text-sm text-muted-foreground">
|
||||
暂无服务
|
||||
<TableCell colSpan={6} className="py-6">
|
||||
<EmptyState
|
||||
title="暂无服务"
|
||||
description="发布服务后会出现在这里。"
|
||||
icon={Plus}
|
||||
className="min-h-[180px] border-dashed"
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user