浏览代码

🔧 chore(client): restructure client directory by removing "-shadcn" suffix

- rename admin-shadcn directory to admin
- rename home-shadcn directory to home
- update import paths in Users.tsx and HomePage.tsx to match new directory structure
- adjust main entry file imports to use new directory names
yourname 3 月之前
父节点
当前提交
e315fd3b4e

+ 0 - 0
src/client/admin-shadcn/components/DataTablePagination.tsx → src/client/admin/components/DataTablePagination.tsx


+ 0 - 0
src/client/admin-shadcn/components/ErrorPage.tsx → src/client/admin/components/ErrorPage.tsx


+ 0 - 0
src/client/admin-shadcn/components/NotFoundPage.tsx → src/client/admin/components/NotFoundPage.tsx


+ 0 - 0
src/client/admin-shadcn/components/ProtectedRoute.tsx → src/client/admin/components/ProtectedRoute.tsx


+ 0 - 0
src/client/admin-shadcn/hooks/AuthProvider.tsx → src/client/admin/hooks/AuthProvider.tsx


+ 0 - 0
src/client/admin-shadcn/index.tsx → src/client/admin/index.tsx


+ 0 - 0
src/client/admin-shadcn/layouts/MainLayout.tsx → src/client/admin/layouts/MainLayout.tsx


+ 0 - 0
src/client/admin-shadcn/menu.tsx → src/client/admin/menu.tsx


+ 0 - 0
src/client/admin-shadcn/pages/Dashboard.tsx → src/client/admin/pages/Dashboard.tsx


+ 0 - 0
src/client/admin-shadcn/pages/Login.tsx → src/client/admin/pages/Login.tsx


+ 1 - 1
src/client/admin-shadcn/pages/Users.tsx → src/client/admin/pages/Users.tsx

@@ -11,7 +11,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@
 import { Badge } from '@/client/components/ui/badge';
 import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/client/components/ui/dialog';
 import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/client/components/ui/form';
-import { DataTablePagination } from '@/client/admin-shadcn/components/DataTablePagination';
+import { DataTablePagination } from '@/client/admin/components/DataTablePagination';
 import { useForm } from 'react-hook-form';
 import { zodResolver } from '@hookform/resolvers/zod';
 import { toast } from 'sonner';

+ 0 - 0
src/client/admin-shadcn/routes.tsx → src/client/admin/routes.tsx


+ 0 - 0
src/client/home-shadcn/components/ErrorPage.tsx → src/client/home/components/ErrorPage.tsx


+ 0 - 0
src/client/home-shadcn/components/NotFoundPage.tsx → src/client/home/components/NotFoundPage.tsx


+ 0 - 0
src/client/home-shadcn/components/ProtectedRoute.tsx → src/client/home/components/ProtectedRoute.tsx


+ 0 - 0
src/client/home-shadcn/hooks/AuthProvider.tsx → src/client/home/hooks/AuthProvider.tsx


+ 0 - 0
src/client/home-shadcn/index.tsx → src/client/home/index.tsx


+ 0 - 0
src/client/home-shadcn/layouts/MainLayout.tsx → src/client/home/layouts/MainLayout.tsx


+ 1 - 1
src/client/home-shadcn/pages/HomePage.tsx → src/client/home/pages/HomePage.tsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { useAuth } from '@/client/home-shadcn/hooks/AuthProvider';
+import { useAuth } from '@/client/home/hooks/AuthProvider';
 import { useNavigate } from 'react-router-dom';
 import { Button } from '@/client/components/ui/button';
 import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/client/components/ui/card';

+ 1 - 1
src/client/home-shadcn/pages/LoginPage.tsx → src/client/home/pages/LoginPage.tsx

@@ -3,7 +3,7 @@ import { useForm } from 'react-hook-form';
 import { zodResolver } from '@hookform/resolvers/zod';
 import { z } from 'zod';
 import { Link, useNavigate } from 'react-router-dom';
-import { useAuth } from '@/client/home-shadcn/hooks/AuthProvider';
+import { useAuth } from '@/client/home/hooks/AuthProvider';
 import { toast } from 'sonner';
 
 import { Button } from '@/client/components/ui/button';

+ 1 - 1
src/client/home-shadcn/pages/MemberPage.tsx → src/client/home/pages/MemberPage.tsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { useNavigate } from 'react-router-dom';
-import { useAuth } from '@/client/home-shadcn/hooks/AuthProvider';
+import { useAuth } from '@/client/home/hooks/AuthProvider';
 import { Button } from '@/client/components/ui/button';
 import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/client/components/ui/card';
 import { Avatar, AvatarFallback, AvatarImage } from '@/client/components/ui/avatar';

+ 1 - 1
src/client/home-shadcn/pages/RegisterPage.tsx → src/client/home/pages/RegisterPage.tsx

@@ -3,7 +3,7 @@ import { useForm } from 'react-hook-form';
 import { zodResolver } from '@hookform/resolvers/zod';
 import { z } from 'zod';
 import { Link, useNavigate } from 'react-router-dom';
-import { useAuth } from '@/client/home-shadcn/hooks/AuthProvider';
+import { useAuth } from '@/client/home/hooks/AuthProvider';
 import { toast } from 'sonner';
 import { authClient } from '@/client/api';
 

+ 0 - 0
src/client/home-shadcn/routes.tsx → src/client/home/routes.tsx


+ 2 - 2
src/client/index.tsx

@@ -1,6 +1,6 @@
 // 如果当前是在 /big 下
 if (window.location.pathname.startsWith('/admin')) {
-  import('./admin-shadcn/index')
+  import('./admin/index')
 } else {
-  import('./home-shadcn/index')
+  import('./home/index')
 }