diff --git a/app/(dashboard)/dashboard/services/new/page.tsx b/app/(dashboard)/dashboard/services/new/page.tsx
index ea5a819..29c1a84 100644
--- a/app/(dashboard)/dashboard/services/new/page.tsx
+++ b/app/(dashboard)/dashboard/services/new/page.tsx
@@ -2,6 +2,7 @@
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
+import { EmptyState } from "@/components/ui/empty-state"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import {
@@ -27,7 +28,7 @@ import { notifyInfo, notifySuccess } from "@/lib/toast"
import type { Game, PlayerService } from "@/lib/types"
import { useAuthStore } from "@/store/auth"
import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"
-import { ArrowLeft } from "lucide-react"
+import { AlertCircle, ArrowLeft } from "lucide-react"
import Link from "next/link"
import { useRouter, useSearchParams } from "next/navigation"
import { useEffect, useState } from "react"
@@ -159,19 +160,35 @@ export default function NewServicePage() {
}, [])
if (loadingService || (currentRole === "owner" && shopLoading)) {
- return
加载中...
+ return (
+
+
+
+ )
}
if (currentRole === "owner" && shopError) {
- return {shopError}
+ return (
+
+
+
+ )
}
if (serviceId && (!editingService || !scopedPlayerIdSet.has(editingService.playerId))) {
- return 服务不存在或当前身份不可编辑
+ return (
+
+
+
+ )
}
if (!targetPlayerId) {
- return 当前身份下没有可管理的服务范围
+ return (
+
+
+
+ )
}
const onSubmit = async (data: z.infer) => {
@@ -214,8 +231,8 @@ export default function NewServicePage() {
返回服务列表
-
-
+
+
发布服务
@@ -303,7 +320,7 @@ export default function NewServicePage() {
-
-
+
签约打手 ({filteredPlayers.length})
@@ -212,14 +225,19 @@ export default function EmployeesPage() {
{dataLoading ? (
-
- 加载中...
+
+
) : filteredPlayers.length === 0 ? (
-
- 暂无签约打手
+
+
) : (
@@ -248,7 +266,7 @@ export default function EmployeesPage() {
-
+
{player.rating}
diff --git a/app/(dashboard)/dashboard/shop/rules/page.tsx b/app/(dashboard)/dashboard/shop/rules/page.tsx
index d5c7c37..dec6688 100644
--- a/app/(dashboard)/dashboard/shop/rules/page.tsx
+++ b/app/(dashboard)/dashboard/shop/rules/page.tsx
@@ -2,6 +2,7 @@
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
+import { EmptyState } from "@/components/ui/empty-state"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import {
@@ -17,22 +18,34 @@ import { toApiError } from "@/lib/errors"
import { useMyShop } from "@/lib/hooks/use-my-shop"
import { notifyInfo, notifySuccess } from "@/lib/toast"
import type { Shop } from "@/lib/types"
-import { Save } from "lucide-react"
+import { AlertCircle, Save } from "lucide-react"
import { useState } from "react"
export default function ShopRulesPage() {
const { shop, setShop, loading, error } = useMyShop()
if (loading) {
- return 加载中...
+ return (
+
+
+
+ )
}
if (error) {
- return {error}
+ return (
+
+
+
+ )
}
if (!shop) {
- return 当前账号没有可管理的店铺
+ return (
+
+
+
+ )
}
return
@@ -83,7 +96,7 @@ function ShopRulesForm({ shop, setShop }: { shop: Shop; setShop: (shop: Shop | n
-
+
员工权限
@@ -117,7 +130,7 @@ function ShopRulesForm({ shop, setShop }: { shop: Shop; setShop: (shop: Shop | n
-
+
派单设置
@@ -143,7 +156,7 @@ function ShopRulesForm({ shop, setShop }: { shop: Shop; setShop: (shop: Shop | n
-
+
抽成设置
diff --git a/app/(dashboard)/dashboard/shop/templates/page.tsx b/app/(dashboard)/dashboard/shop/templates/page.tsx
index c6a2173..af44d13 100644
--- a/app/(dashboard)/dashboard/shop/templates/page.tsx
+++ b/app/(dashboard)/dashboard/shop/templates/page.tsx
@@ -2,6 +2,7 @@
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
+import { EmptyState } from "@/components/ui/empty-state"
import { Switch } from "@/components/ui/switch"
import { updateShopTemplate } from "@/lib/api"
import { getShopSections } from "@/lib/domain/shop-template"
@@ -9,7 +10,7 @@ import { toApiError } from "@/lib/errors"
import { useMyShop } from "@/lib/hooks/use-my-shop"
import { notifyInfo } from "@/lib/toast"
import type { Shop, ShopSection } from "@/lib/types"
-import { Eye, EyeOff, GripVertical } from "lucide-react"
+import { AlertCircle, Eye, EyeOff, GripVertical } from "lucide-react"
import Link from "next/link"
import { type DragEvent, useEffect, useState } from "react"
@@ -35,15 +36,27 @@ export default function ShopTemplatesPage() {
const { shop, setShop, loading, error } = useMyShop()
if (loading) {
- return 加载中...
+ return (
+
+
+
+ )
}
if (error) {
- return {error}
+ return (
+
+
+
+ )
}
if (!shop) {
- return 当前账号没有可管理的店铺
+ return (
+
+
+
+ )
}
return
@@ -136,7 +149,7 @@ function ShopTemplatesEditor({
return (
{showSavedToast ? (
-
+
模板已保存
) : null}
@@ -146,7 +159,7 @@ function ShopTemplatesEditor({
自定义店铺主页的展示内容和顺序
-
+
预览
-
+
页面组件
@@ -168,7 +181,7 @@ function ShopTemplatesEditor({
{sections.map((section, index) => (
-
+
提示