去除多余异常
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { AlertCircle, RefreshCw } from 'lucide-react';
|
import { AlertCircle, RefreshCw } from 'lucide-react';
|
||||||
import { ApiKeyForm } from './components/ApiKeyForm';
|
import { ApiKeyForm } from './components/ApiKeyForm';
|
||||||
import { ApiKeyCard } from './components/ApiKeyCard';
|
import { ApiKeyCard } from './components/ApiKeyCard';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { CheckCircle2, XCircle, Loader2, Trash2, RefreshCw, Copy, Eye, EyeOff } from 'lucide-react';
|
import { CheckCircle2, XCircle,Trash2, RefreshCw, Copy, Eye, EyeOff } from 'lucide-react';
|
||||||
import { apiKeyService } from '../services/api';
|
import { apiKeyService } from '../services/api';
|
||||||
import type { ApiKey } from '../types/api';
|
import type { ApiKey } from '../types/api';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React from 'react';
|
import { CheckCircle, XCircle, Zap,JapaneseYen } from 'lucide-react';
|
||||||
import { CheckCircle, XCircle, DollarSign, Zap } from 'lucide-react';
|
|
||||||
import type { ApiKey } from '../types/api';
|
import type { ApiKey } from '../types/api';
|
||||||
|
|
||||||
interface StatsProps {
|
interface StatsProps {
|
||||||
@@ -36,8 +35,8 @@ export function Stats({ apiKeys }: StatsProps) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '总余额',
|
name: '总余额',
|
||||||
value: `$${totalBalance.toFixed(2)}`,
|
value: `¥${totalBalance.toFixed(2)}`,
|
||||||
icon: DollarSign,
|
icon: JapaneseYen,
|
||||||
color: 'text-blue-600',
|
color: 'text-blue-600',
|
||||||
bgColor: 'bg-blue-50',
|
bgColor: 'bg-blue-50',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const prisma = new PrismaClient();
|
|||||||
export interface ApiKeyInput {
|
export interface ApiKeyInput {
|
||||||
name: string;
|
name: string;
|
||||||
key: string;
|
key: string;
|
||||||
description?: string;
|
description?: string| null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiKeyWithValidation extends ApiKeyInput {
|
export interface ApiKeyWithValidation extends ApiKeyInput {
|
||||||
@@ -20,7 +20,7 @@ export interface ApiKeyWithValidation extends ApiKeyInput {
|
|||||||
} | null;
|
} | null;
|
||||||
lastChecked: Date;
|
lastChecked: Date;
|
||||||
checkCount: number;
|
checkCount: number;
|
||||||
error?: string;
|
error?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ApiKeyService {
|
export class ApiKeyService {
|
||||||
@@ -44,7 +44,7 @@ export class ApiKeyService {
|
|||||||
...apiKey,
|
...apiKey,
|
||||||
|
|
||||||
key: apiKey.key, // 直接传输真实key
|
key: apiKey.key, // 直接传输真实key
|
||||||
error: validation.error || undefined,
|
error: validation.error ,
|
||||||
user: validation.user || null,
|
user: validation.user || null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user