mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: Add More Translation Text & Minor UI Fixes (#861)
* config token translation * more translation and fix * fix conflict * fix(DialogTemplate) bug with the spec.tsx, localize hooks need to be in a recoil root * small clean up * fix(NewTopic) in endpoint * fix(RecoilRoot) * test(DialogTemplate.spec) used data-testid * fix(DialogTemplate) * some cleanup --------- Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
This commit is contained in:
parent
28230d9305
commit
ac8b898495
28 changed files with 333 additions and 206 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useState } from 'react';
|
||||
import { FileUp } from 'lucide-react';
|
||||
import { cn } from '~/utils/';
|
||||
import { useLocalize } from '~/hooks';
|
||||
|
||||
type FileUploadProps = {
|
||||
onFileSelected: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
|
|
@ -23,6 +24,7 @@ const FileUpload: React.FC<FileUploadProps> = ({
|
|||
}) => {
|
||||
const [statusColor, setStatusColor] = useState<string>('text-gray-600');
|
||||
const [status, setStatus] = useState<null | string>(null);
|
||||
const localize = useLocalize();
|
||||
|
||||
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
||||
const file = event.target.files?.[0];
|
||||
|
|
@ -59,7 +61,11 @@ const FileUpload: React.FC<FileUploadProps> = ({
|
|||
>
|
||||
<FileUp className="mr-1 flex w-[22px] items-center stroke-1" />
|
||||
<span className="flex text-xs ">
|
||||
{!status ? text || 'Import' : status === 'success' ? successText : invalidText}
|
||||
{!status
|
||||
? text || localize('com_endpoint_import')
|
||||
: status === localize('com_ui_succes')
|
||||
? successText
|
||||
: invalidText}
|
||||
</span>
|
||||
<input
|
||||
id={`file-upload-${id}`}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue