管理后台
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Button } from '@/components/ui/button'
|
||||
@ -9,12 +9,12 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigge
|
||||
import {
|
||||
FolderOpen,
|
||||
FolderPlus,
|
||||
MoreVerticalIcon,
|
||||
EditIcon,
|
||||
TrashIcon,
|
||||
PlusIcon,
|
||||
SearchIcon,
|
||||
TreePineIcon
|
||||
MoreVertical,
|
||||
Edit,
|
||||
Trash,
|
||||
Plus,
|
||||
Search,
|
||||
TreePine
|
||||
} from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { categoryService } from '@/services/categoryService'
|
||||
@ -79,12 +79,12 @@ export default function Categories() {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="sm">
|
||||
<MoreVerticalIcon className="h-4 w-4" />
|
||||
<MoreVertical className="h-4 w-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem>
|
||||
<EditIcon className="h-4 w-4 mr-2" />
|
||||
<Edit className="h-4 w-4 mr-2" />
|
||||
编辑
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem>
|
||||
@ -95,7 +95,7 @@ export default function Categories() {
|
||||
onClick={() => handleDeleteCategory(category.id)}
|
||||
disabled={category.photoCount > 0 || category.children?.length > 0}
|
||||
>
|
||||
<TrashIcon className="h-4 w-4 mr-2" />
|
||||
<Trash className="h-4 w-4 mr-2" />
|
||||
删除
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
@ -122,7 +122,7 @@ export default function Categories() {
|
||||
</p>
|
||||
</div>
|
||||
<Button className="flex items-center gap-2">
|
||||
<PlusIcon className="h-4 w-4" />
|
||||
<Plus className="h-4 w-4" />
|
||||
新建分类
|
||||
</Button>
|
||||
</div>
|
||||
@ -146,7 +146,7 @@ export default function Categories() {
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle className="text-sm font-medium">活跃分类</CardTitle>
|
||||
<TreePineIcon className="h-4 w-4 text-muted-foreground" />
|
||||
<TreePine className="h-4 w-4 text-muted-foreground" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
{statsLoading ? (
|
||||
@ -193,7 +193,7 @@ export default function Categories() {
|
||||
<CardContent className="pt-6">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex-1 relative">
|
||||
<SearchIcon className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4" />
|
||||
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4" />
|
||||
<Input
|
||||
placeholder="搜索分类..."
|
||||
value={search}
|
||||
@ -202,7 +202,7 @@ export default function Categories() {
|
||||
/>
|
||||
</div>
|
||||
<Button variant="outline">
|
||||
<TreePineIcon className="h-4 w-4 mr-2" />
|
||||
<TreePine className="h-4 w-4 mr-2" />
|
||||
树形视图
|
||||
</Button>
|
||||
</div>
|
||||
@ -240,7 +240,7 @@ export default function Categories() {
|
||||
创建您的第一个分类来组织照片
|
||||
</p>
|
||||
<Button>
|
||||
<PlusIcon className="h-4 w-4 mr-2" />
|
||||
<Plus className="h-4 w-4 mr-2" />
|
||||
创建分类
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user