- Page {currentPage} of {totalPages}
+ 第 {currentPage} / {totalPages} 页
({
onClick={() => table.setPageIndex(0)}
disabled={!table.getCanPreviousPage()}
>
- Go to first page
+ 跳到第一页
({
onClick={() => table.previousPage()}
disabled={!table.getCanPreviousPage()}
>
- Go to previous page
+ 上一页
@@ -98,7 +98,7 @@ export function DataTablePagination({
className='h-8 min-w-8 px-2'
onClick={() => table.setPageIndex((pageNumber as number) - 1)}
>
- Go to page {pageNumber}
+ 跳到第 {pageNumber} 页
{pageNumber}
)}
@@ -111,7 +111,7 @@ export function DataTablePagination({
onClick={() => table.nextPage()}
disabled={!table.getCanNextPage()}
>
- Go to next page
+ 下一页
({
onClick={() => table.setPageIndex(table.getPageCount() - 1)}
disabled={!table.getCanNextPage()}
>
- Go to last page
+ 跳到最后一页
diff --git a/shadcn-admin/src/components/data-table/toolbar.tsx b/shadcn-admin/src/components/data-table/toolbar.tsx
index 473e6b0..03dc138 100644
--- a/shadcn-admin/src/components/data-table/toolbar.tsx
+++ b/shadcn-admin/src/components/data-table/toolbar.tsx
@@ -22,7 +22,7 @@ type DataTableToolbarProps
= {
export function DataTableToolbar({
table,
- searchPlaceholder = 'Filter...',
+ searchPlaceholder = '筛选...',
searchKey,
filters = [],
}: DataTableToolbarProps) {
@@ -74,7 +74,7 @@ export function DataTableToolbar({
}}
className='h-8 px-2 lg:px-3'
>
- Reset
+ 重置
)}
diff --git a/shadcn-admin/src/components/data-table/view-options.tsx b/shadcn-admin/src/components/data-table/view-options.tsx
index f972624..5431233 100644
--- a/shadcn-admin/src/components/data-table/view-options.tsx
+++ b/shadcn-admin/src/components/data-table/view-options.tsx
@@ -26,11 +26,11 @@ export function DataTableViewOptions({
className='ms-auto hidden h-8 lg:flex'
>
- View
+ 视图
- Toggle columns
+ 显示列
{table
.getAllColumns()
diff --git a/shadcn-admin/src/components/layout/app-sidebar.tsx b/shadcn-admin/src/components/layout/app-sidebar.tsx
index 32d9443..2241ffa 100644
--- a/shadcn-admin/src/components/layout/app-sidebar.tsx
+++ b/shadcn-admin/src/components/layout/app-sidebar.tsx
@@ -6,22 +6,17 @@ import {
SidebarHeader,
SidebarRail,
} from '@/components/ui/sidebar'
-// import { AppTitle } from './app-title'
+import { AppTitle } from './app-title'
import { sidebarData } from './data/sidebar-data'
import { NavGroup } from './nav-group'
import { NavUser } from './nav-user'
-import { TeamSwitcher } from './team-switcher'
export function AppSidebar() {
const { collapsible, variant } = useLayout()
return (
-
-
- {/* Replace with the following
- /* if you want to use the normal app title instead of TeamSwitch dropdown */}
- {/* */}
+
{sidebarData.navGroups.map((props) => (
diff --git a/shadcn-admin/src/components/layout/app-title.tsx b/shadcn-admin/src/components/layout/app-title.tsx
index 112e463..f8f667f 100644
--- a/shadcn-admin/src/components/layout/app-title.tsx
+++ b/shadcn-admin/src/components/layout/app-title.tsx
@@ -25,8 +25,8 @@ export function AppTitle() {
onClick={() => setOpenMobile(false)}
className='grid flex-1 text-start text-sm leading-tight'
>
- Shadcn-Admin
- Vite + ShadcnUI
+ WEIAI
+ 角色卡管理
@@ -58,7 +58,7 @@ function ToggleSidebar({
>
{user.name}
@@ -69,7 +60,7 @@ export function NavUser({ user }: NavUserProps) {
- SN
+ WA
{user.name}
@@ -78,40 +69,12 @@ export function NavUser({ user }: NavUserProps) {
-
-
-
- Upgrade to Pro
-
-
-
-
-
-
-
- Account
-
-
-
-
-
- Billing
-
-
-
-
-
- Notifications
-
-
-
-
setOpen(true)}
>
- Sign out
+ 退出登录
diff --git a/shadcn-admin/src/components/profile-dropdown.tsx b/shadcn-admin/src/components/profile-dropdown.tsx
index 8d8cb87..e48ef3d 100644
--- a/shadcn-admin/src/components/profile-dropdown.tsx
+++ b/shadcn-admin/src/components/profile-dropdown.tsx
@@ -1,11 +1,9 @@
-import { Link } from '@tanstack/react-router'
import useDialogState from '@/hooks/use-dialog-state'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { Button } from '@/components/ui/button'
import {
DropdownMenu,
DropdownMenuContent,
- DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
@@ -23,45 +21,23 @@ export function ProfileDropdown() {
-
- SN
+
+ WA
-
satnaing
+
WEIAI
- satnaingdev@gmail.com
+ weiai@example.com
-
-
-
- Profile
- ⇧⌘P
-
-
-
-
- Billing
- ⌘B
-
-
-
-
- Settings
- ⌘S
-
-
- New Team
-
-
setOpen(true)}>
- Sign out
+ 退出登录
⇧⌘Q
diff --git a/shadcn-admin/src/components/search.tsx b/shadcn-admin/src/components/search.tsx
index 3539340..5d9c2ae 100644
--- a/shadcn-admin/src/components/search.tsx
+++ b/shadcn-admin/src/components/search.tsx
@@ -11,7 +11,7 @@ type SearchProps = {
export function Search({
className = '',
- placeholder = 'Search',
+ placeholder = '搜索',
}: SearchProps) {
const { setOpen } = useSearch()
return (
diff --git a/shadcn-admin/src/components/sign-out-dialog.tsx b/shadcn-admin/src/components/sign-out-dialog.tsx
index c4eb368..02c2803 100644
--- a/shadcn-admin/src/components/sign-out-dialog.tsx
+++ b/shadcn-admin/src/components/sign-out-dialog.tsx
@@ -27,9 +27,9 @@ export function SignOutDialog({ open, onOpenChange }: SignOutDialogProps) {
- Toggle theme
+ 切换主题
setTheme('light')}>
- Light{' '}
+ 浅色{' '}
setTheme('dark')}>
- Dark
+ 深色
setTheme('system')}>
- System
+ 跟随系统
-
Shadcn Admin
+ WEIAI
{children}
diff --git a/shadcn-admin/src/features/auth/sign-in/components/user-auth-form.tsx b/shadcn-admin/src/features/auth/sign-in/components/user-auth-form.tsx
index 05c8e71..2540aec 100644
--- a/shadcn-admin/src/features/auth/sign-in/components/user-auth-form.tsx
+++ b/shadcn-admin/src/features/auth/sign-in/components/user-auth-form.tsx
@@ -5,9 +5,8 @@ import { zodResolver } from '@hookform/resolvers/zod'
import { Link, useNavigate } from '@tanstack/react-router'
import { Loader2, LogIn } from 'lucide-react'
import { toast } from 'sonner'
-import { IconFacebook, IconGithub, IconGoogle } from '@/assets/brand-icons'
import { useAuthStore } from '@/stores/auth-store'
-import { sleep, cn } from '@/lib/utils'
+import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import { supabase } from '@/lib/supabase'
import {
@@ -85,22 +84,6 @@ export function UserAuthForm({
}
}
- const handleGoogleLogin = async () => {
- setIsLoading(true)
- try {
- const { error } = await supabase.auth.signInWithOAuth({
- provider: 'google',
- options: {
- redirectTo: `${window.location.origin}/`,
- },
- })
- if (error) throw error
- } catch (error: any) {
- toast.error(error.message || 'Google login failed')
- setIsLoading(false)
- }
- }
-
return (
diff --git a/shadcn-admin/src/features/auth/sign-in/index.tsx b/shadcn-admin/src/features/auth/sign-in/index.tsx
index 7269446..945b13b 100644
--- a/shadcn-admin/src/features/auth/sign-in/index.tsx
+++ b/shadcn-admin/src/features/auth/sign-in/index.tsx
@@ -17,10 +17,9 @@ export function SignIn() {