new build

fix api alert
This commit is contained in:
ArnoChen
2025-02-17 01:59:55 +08:00
parent c5f380986d
commit dfd7f702dc
7 changed files with 1083 additions and 1077 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg" /> <link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lightrag</title> <title>Lightrag</title>
<script type="module" crossorigin src="./assets/index-CGBwpbZt.js"></script> <script type="module" crossorigin src="./assets/index-BMB0OroL.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BhTFLcnv.css"> <link rel="stylesheet" crossorigin href="./assets/index-CLgSwrjG.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>

View File

@@ -46,8 +46,10 @@ function App() {
if (message) { if (message) {
if (message.includes(InvalidApiKeyError) || message.includes(RequireApiKeError)) { if (message.includes(InvalidApiKeyError) || message.includes(RequireApiKeError)) {
setApiKeyInvalid(true) setApiKeyInvalid(true)
return
} }
} }
setApiKeyInvalid(false)
}, [message, setApiKeyInvalid]) }, [message, setApiKeyInvalid])
return ( return (

View File

@@ -4,8 +4,7 @@ import {
AlertDialogContent, AlertDialogContent,
AlertDialogDescription, AlertDialogDescription,
AlertDialogHeader, AlertDialogHeader,
AlertDialogTitle, AlertDialogTitle
AlertDialogTrigger
} from '@/components/ui/AlertDialog' } from '@/components/ui/AlertDialog'
import Button from '@/components/ui/Button' import Button from '@/components/ui/Button'
import Input from '@/components/ui/Input' import Input from '@/components/ui/Input'
@@ -51,7 +50,6 @@ const ApiKeyAlert = () => {
return ( return (
<AlertDialog open={opened} onOpenChange={setOpened}> <AlertDialog open={opened} onOpenChange={setOpened}>
<AlertDialogTrigger>Open</AlertDialogTrigger>
<AlertDialogContent> <AlertDialogContent>
<AlertDialogHeader> <AlertDialogHeader>
<AlertDialogTitle>API Key is required</AlertDialogTitle> <AlertDialogTitle>API Key is required</AlertDialogTitle>