mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
feat: show loading state on Langfuse test connection button
This commit is contained in:
parent
ce72d7d3a6
commit
5f6bed6a92
2 changed files with 18 additions and 2 deletions
|
|
@ -1,5 +1,13 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
import { Button, Input, Label, SecretInput, Switch, useToastContext } from '@librechat/client';
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
Label,
|
||||
SecretInput,
|
||||
Spinner,
|
||||
Switch,
|
||||
useToastContext,
|
||||
} from '@librechat/client';
|
||||
import {
|
||||
useGetLangfuseConnectionQuery,
|
||||
useUpdateLangfuseConnectionMutation,
|
||||
|
|
@ -162,7 +170,14 @@ export default function LangfuseConnection() {
|
|||
disabled={!canSubmit || testMutation.isLoading}
|
||||
onClick={handleTest}
|
||||
>
|
||||
{localize('com_ui_langfuse_test')}
|
||||
{testMutation.isLoading ? (
|
||||
<span className="flex items-center gap-2">
|
||||
<Spinner className="h-4 w-4" />
|
||||
{localize('com_ui_langfuse_testing')}
|
||||
</span>
|
||||
) : (
|
||||
localize('com_ui_langfuse_test')
|
||||
)}
|
||||
</Button>
|
||||
<Button disabled={!canSubmit || updateMutation.isLoading} onClick={handleSave}>
|
||||
{localize('com_ui_save')}
|
||||
|
|
|
|||
|
|
@ -1650,6 +1650,7 @@
|
|||
"com_ui_langfuse_secret_key_hint": "The secret key is encrypted at rest and is never shown again after saving.",
|
||||
"com_ui_langfuse_secret_key_fingerprint": "Configured key fingerprint:",
|
||||
"com_ui_langfuse_test": "Test connection",
|
||||
"com_ui_langfuse_testing": "Testing connection",
|
||||
"com_ui_langfuse_saved": "Langfuse connection saved",
|
||||
"com_ui_langfuse_save_error": "Failed to save the Langfuse connection",
|
||||
"com_ui_langfuse_test_success": "Connected to Langfuse successfully",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue