This commit is contained in:
ryan
2026-07-13 15:44:03 +08:00
parent 0548a8a5d4
commit 26be762c3a
102 changed files with 909 additions and 490 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import {type PolicySection} from './types';
import {CodeBlock} from '@/components/ui/code-block';
import { type PolicySection } from './types';
import { CodeBlock } from '@/components/ui/code-block';
import {
DocsTable,
DocsTableBody,
@@ -1,10 +1,10 @@
'use client';
import * as React from 'react';
import {ImageOff} from 'lucide-react';
import { ImageOff } from 'lucide-react';
import {cn} from '@/lib/utils';
import {getFileUrl, type ImageQuality} from '@/lib/services/upload/utils';
import { cn } from '@/lib/utils';
import { getFileUrl, type ImageQuality } from '@/lib/services/upload/utils';
type FileImagePreviewProps = {
fileId: string | number;
@@ -2,16 +2,33 @@
import * as React from 'react';
import Link from 'next/link';
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query';
import {motion} from 'motion/react';
import {AlertTriangle, Check, Copy, Info, Key, Loader2, Plus, RefreshCw, Shield, Trash2,} from 'lucide-react';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { motion } from 'motion/react';
import {
AlertTriangle,
Check,
Copy,
Info,
Key,
Loader2,
Plus,
RefreshCw,
Shield,
Trash2,
} from 'lucide-react';
import {Button} from '@/components/ui/button';
import {Card, CardContent, CardDescription, CardHeader, CardTitle,} from '@/components/ui/card';
import {Input} from '@/components/ui/input';
import {Label} from '@/components/ui/label';
import {Badge} from '@/components/ui/badge';
import {Switch} from '@/components/ui/switch';
import { Button } from '@/components/ui/button';
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Badge } from '@/components/ui/badge';
import { Switch } from '@/components/ui/switch';
import {
Dialog,
DialogContent,
@@ -28,10 +45,10 @@ import {
BreadcrumbPage,
BreadcrumbSeparator,
} from '@/components/ui/breadcrumb';
import type {CreateTokenResponse} from '@/lib/services/user';
import {UserService} from '@/lib/services/user';
import {useAuth} from '@/components/providers/auth-provider';
import {toast} from 'sonner';
import type { CreateTokenResponse } from '@/lib/services/user';
import { UserService } from '@/lib/services/user';
import { useAuth } from '@/components/providers/auth-provider';
import { toast } from 'sonner';
export function AccessTokenMain() {
const { user } = useAuth();
@@ -2,12 +2,12 @@
import * as React from 'react';
import Link from 'next/link';
import {Check, Loader2, Monitor, Moon, Sun} from 'lucide-react';
import {useTheme} from 'next-themes';
import {toast} from 'sonner';
import {Button} from '@/components/ui/button';
import {useCustomTheme} from '@/lib/theme';
import {cn} from '@/lib/utils';
import { Check, Loader2, Monitor, Moon, Sun } from 'lucide-react';
import { useTheme } from 'next-themes';
import { toast } from 'sonner';
import { Button } from '@/components/ui/button';
import { useCustomTheme } from '@/lib/theme';
import { cn } from '@/lib/utils';
import {
Breadcrumb,
BreadcrumbItem,
@@ -1,14 +1,20 @@
'use client';
import {useEffect, useState} from 'react';
import {toast} from 'sonner';
import {Button} from '@/components/ui/button';
import {Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle,} from '@/components/ui/dialog';
import {Input} from '@/components/ui/input';
import {Label} from '@/components/ui/label';
import {Switch} from '@/components/ui/switch';
import { useEffect, useState } from 'react';
import { toast } from 'sonner';
import { Button } from '@/components/ui/button';
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Switch } from '@/components/ui/switch';
import services from '@/lib/services';
import type {AuthSource, AuthSourceRequest} from '@/lib/services/admin';
import type { AuthSource, AuthSourceRequest } from '@/lib/services/admin';
const emptyForm: AuthSourceRequest = {
name: '',
@@ -1,7 +1,7 @@
'use client';
import * as React from 'react';
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import {
ChevronLeft,
ChevronRight,
@@ -19,12 +19,12 @@ import {
Trash2,
Upload,
} from 'lucide-react';
import {toast} from 'sonner';
import { toast } from 'sonner';
import {Button} from '@/components/ui/button';
import {Input} from '@/components/ui/input';
import {Badge} from '@/components/ui/badge';
import {Card, CardContent} from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent } from '@/components/ui/card';
import {
AlertDialog,
AlertDialogAction,
@@ -36,9 +36,9 @@ import {
AlertDialogTitle,
} from '@/components/ui/alert-dialog';
import {FileImagePreview} from '@/components/common/file-image-preview';
import services, {formatFileSize} from '@/lib/services';
import type {Upload as UploadRecord} from '@/lib/services/upload/types';
import { FileImagePreview } from '@/components/common/file-image-preview';
import services, { formatFileSize } from '@/lib/services';
import type { Upload as UploadRecord } from '@/lib/services/upload/types';
/* ─── 工具函数 ─────────────────────────────────────────── */