mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 23:46:52 +08:00
### What problem does this PR solve? Fixes: Fixed some bugs #10703 - Removed S3 upload from the file upload component - Updated the dropdown menu style on the model provider page - Updated some model provider icons - Fixed other style issues ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
import { t } from 'i18next';
|
||||
import { ArrowBigLeft } from 'lucide-react';
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'umi';
|
||||
@ -33,7 +34,7 @@ const BackButton: React.FC<BackButtonProps> = ({
|
||||
{...props}
|
||||
>
|
||||
<ArrowBigLeft className="h-4 w-4" />
|
||||
{children || 'Back'}
|
||||
{children || t('common.back')}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
@ -6,7 +6,6 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { IModalProps } from '@/interfaces/common';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { TFunction } from 'i18next';
|
||||
@ -102,7 +101,7 @@ export function FileUploadDialog({
|
||||
<DialogHeader>
|
||||
<DialogTitle>{t('fileManager.uploadFile')}</DialogTitle>
|
||||
</DialogHeader>
|
||||
<Tabs defaultValue="account">
|
||||
{/* <Tabs defaultValue="account">
|
||||
<TabsList className="grid w-full grid-cols-2 mb-4">
|
||||
<TabsTrigger value="account">{t('fileManager.local')}</TabsTrigger>
|
||||
<TabsTrigger value="password">{t('fileManager.s3')}</TabsTrigger>
|
||||
@ -114,7 +113,11 @@ export function FileUploadDialog({
|
||||
></UploadForm>
|
||||
</TabsContent>
|
||||
<TabsContent value="password">{t('common.comingSoon')}</TabsContent>
|
||||
</Tabs>
|
||||
</Tabs> */}
|
||||
<UploadForm
|
||||
submit={onOk!}
|
||||
showParseOnCreation={showParseOnCreation}
|
||||
></UploadForm>
|
||||
<DialogFooter>
|
||||
<ButtonLoading type="submit" loading={loading} form={UploadFormId}>
|
||||
{t('common.save')}
|
||||
|
||||
@ -68,6 +68,7 @@ export const LlmIcon = ({
|
||||
LLMFactory.FishAudio,
|
||||
LLMFactory.TogetherAI,
|
||||
LLMFactory.Meituan,
|
||||
LLMFactory.Longcat,
|
||||
];
|
||||
let icon = useMemo(() => {
|
||||
const icontemp = IconMap[name as keyof typeof IconMap];
|
||||
@ -84,7 +85,7 @@ export const LlmIcon = ({
|
||||
const svgIcons = [
|
||||
LLMFactory.LocalAI,
|
||||
// LLMFactory.VolcEngine,
|
||||
LLMFactory.MiniMax,
|
||||
// LLMFactory.MiniMax,
|
||||
LLMFactory.Gemini,
|
||||
LLMFactory.StepFun,
|
||||
// LLMFactory.DeerAPI,
|
||||
@ -101,9 +102,16 @@ export const LlmIcon = ({
|
||||
}
|
||||
|
||||
return icon ? (
|
||||
<IconFontFill name={icon} className={cn('size-8', imgClass)} />
|
||||
<IconFontFill
|
||||
name={icon}
|
||||
className={cn('size-8 flex items-center justify-center', imgClass)}
|
||||
/>
|
||||
) : (
|
||||
<Avatar shape="square" size={size} icon={<UserOutlined />} />
|
||||
<IconFontFill
|
||||
name={'moxing-default'}
|
||||
className={cn('size-8 flex items-center justify-center', imgClass)}
|
||||
/>
|
||||
// <Avatar shape="square" size={size} icon={<UserOutlined />} />
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ const Command = React.forwardRef<
|
||||
<CommandPrimitive
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',
|
||||
'flex h-full w-full flex-col overflow-hidden rounded-md bg-bg-base text-text-primary border-[0.5px] border-border-button',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@ -108,7 +108,7 @@ const Modal: ModalType = ({
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => handleCancel()}
|
||||
className="px-2 py-1 border border-input rounded-md hover:bg-muted"
|
||||
className="px-2 py-1 border border-border-button rounded-md hover:bg-bg-card hover:text-text-primary "
|
||||
>
|
||||
{cancelText ?? t('modal.cancelText')}
|
||||
</button>
|
||||
@ -132,7 +132,7 @@ const Modal: ModalType = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center justify-end px-6 py-4',
|
||||
'flex items-center justify-end px-6 py-6',
|
||||
footerClassName,
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user