mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 12:32:30 +08:00
### What problem does this PR solve? Fix: Modify the personal center style ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -496,7 +496,7 @@ const DynamicForm = {
|
|||||||
<Textarea
|
<Textarea
|
||||||
{...finalFieldProps}
|
{...finalFieldProps}
|
||||||
placeholder={field.placeholder}
|
placeholder={field.placeholder}
|
||||||
className="resize-none"
|
// className="resize-none"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
@ -544,7 +544,7 @@ const DynamicForm = {
|
|||||||
render={({ field: formField }) => (
|
render={({ field: formField }) => (
|
||||||
<FormItem
|
<FormItem
|
||||||
className={cn('flex items-center w-full', {
|
className={cn('flex items-center w-full', {
|
||||||
'flex-row items-start space-x-3 space-y-0':
|
'flex-row items-center space-x-3 space-y-0':
|
||||||
!field.horizontal,
|
!field.horizontal,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { EyeIcon, EyeOffIcon } from 'lucide-react';
|
|
||||||
import React, { useId, useState } from 'react';
|
import React, { useId, useState } from 'react';
|
||||||
import { Input, InputProps } from '../ui/input';
|
import { Input, InputProps } from '../ui/input';
|
||||||
|
|
||||||
@ -33,11 +32,11 @@ export default React.forwardRef<HTMLInputElement, InputProps>(
|
|||||||
aria-pressed={isVisible}
|
aria-pressed={isVisible}
|
||||||
aria-controls="password"
|
aria-controls="password"
|
||||||
>
|
>
|
||||||
{isVisible ? (
|
{/* {isVisible ? (
|
||||||
<EyeOffIcon size={16} aria-hidden="true" />
|
<EyeOffIcon size={16} aria-hidden="true" />
|
||||||
) : (
|
) : (
|
||||||
<EyeIcon size={16} aria-hidden="true" />
|
<EyeIcon size={16} aria-hidden="true" />
|
||||||
)}
|
)} */}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -140,7 +140,7 @@ export const SelectWithSearch = forwardRef<
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={cn(
|
className={cn(
|
||||||
'!bg-bg-input hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px] [&_svg]:pointer-events-auto',
|
'!bg-bg-input hover:bg-background border-border-button w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px] [&_svg]:pointer-events-auto',
|
||||||
triggerClassName,
|
triggerClassName,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@ -166,7 +166,7 @@ export const SelectWithSearch = forwardRef<
|
|||||||
)}
|
)}
|
||||||
<ChevronDownIcon
|
<ChevronDownIcon
|
||||||
size={16}
|
size={16}
|
||||||
className="text-muted-foreground/80 shrink-0 ml-2"
|
className="text-text-disabled shrink-0 ml-2"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -41,7 +41,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|||||||
type={isPasswordInput && showPassword ? 'text' : type}
|
type={isPasswordInput && showPassword ? 'text' : type}
|
||||||
className={cn(
|
className={cn(
|
||||||
'peer/input',
|
'peer/input',
|
||||||
'flex h-8 w-full rounded-md border-0.5 border-input bg-bg-input px-3 py-2 outline-none text-sm text-text-primary',
|
'flex h-8 w-full rounded-md border-0.5 border-border-button bg-bg-input px-3 py-2 outline-none text-sm text-text-primary',
|
||||||
'file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-text-disabled',
|
'file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-text-disabled',
|
||||||
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-primary',
|
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-primary',
|
||||||
'disabled:cursor-not-allowed disabled:opacity-50 transition-colors',
|
'disabled:cursor-not-allowed disabled:opacity-50 transition-colors',
|
||||||
|
|||||||
@ -54,7 +54,7 @@ const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|||||||
return (
|
return (
|
||||||
<textarea
|
<textarea
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex min-h-[80px] w-full bg-bg-input rounded-md border border-input px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm overflow-hidden',
|
'flex min-h-[80px] w-full bg-bg-input rounded-md border border-input px-3 py-2 text-base ring-offset-background placeholder:text-text-disabled focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm overflow-hidden',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
rows={autoSize?.minRows ?? props.rows ?? undefined}
|
rows={autoSize?.minRows ?? props.rows ?? undefined}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import { Info } from 'lucide-react';
|
import { CircleQuestionMark } from 'lucide-react';
|
||||||
|
|
||||||
const TooltipProvider = TooltipPrimitive.Provider;
|
const TooltipProvider = TooltipPrimitive.Provider;
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ export const FormTooltip = ({ tooltip }: { tooltip: React.ReactNode }) => {
|
|||||||
e.preventDefault(); // Prevent clicking the tooltip from triggering form save
|
e.preventDefault(); // Prevent clicking the tooltip from triggering form save
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Info className="size-3 ml-2" />
|
<CircleQuestionMark className="size-3 ml-2" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>{tooltip}</TooltipContent>
|
<TooltipContent>{tooltip}</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
@ -61,9 +61,10 @@ function buildLlmOptionsWithIcon(x: IThirdOAIModel) {
|
|||||||
<div className="flex items-center justify-center gap-6">
|
<div className="flex items-center justify-center gap-6">
|
||||||
<LlmIcon
|
<LlmIcon
|
||||||
name={getLLMIconName(x.fid, x.llm_name)}
|
name={getLLMIconName(x.fid, x.llm_name)}
|
||||||
width={26}
|
width={24}
|
||||||
height={26}
|
height={24}
|
||||||
size={'small'}
|
size={'small'}
|
||||||
|
imgClass="size-6"
|
||||||
/>
|
/>
|
||||||
<span>{getRealModelName(x.llm_name)}</span>
|
<span>{getRealModelName(x.llm_name)}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
translation: {
|
translation: {
|
||||||
common: {
|
common: {
|
||||||
|
confirm: 'Confirm',
|
||||||
back: 'Back',
|
back: 'Back',
|
||||||
noResults: 'No results.',
|
noResults: 'No results.',
|
||||||
selectPlaceholder: 'select value',
|
selectPlaceholder: 'select value',
|
||||||
@ -694,6 +695,7 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s
|
|||||||
tocEnhanceTip: ` During the parsing of the document, table of contents information was generated (see the 'Enable Table of Contents Extraction' option in the General method). This allows the large model to return table of contents items relevant to the user's query, thereby using these items to retrieve related chunks and apply weighting to these chunks during the sorting process. This approach is derived from mimicking the behavioral logic of how humans search for knowledge in books.`,
|
tocEnhanceTip: ` During the parsing of the document, table of contents information was generated (see the 'Enable Table of Contents Extraction' option in the General method). This allows the large model to return table of contents items relevant to the user's query, thereby using these items to retrieve related chunks and apply weighting to these chunks during the sorting process. This approach is derived from mimicking the behavioral logic of how humans search for knowledge in books.`,
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
|
edit: 'Edit',
|
||||||
cropTip:
|
cropTip:
|
||||||
'Drag the selection area to choose the cropping position of the image, and scroll to zoom in/out',
|
'Drag the selection area to choose the cropping position of the image, and scroll to zoom in/out',
|
||||||
cropImage: 'Crop image',
|
cropImage: 'Crop image',
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
translation: {
|
translation: {
|
||||||
common: {
|
common: {
|
||||||
|
confirm: '确定',
|
||||||
back: '返回',
|
back: '返回',
|
||||||
noResults: '无结果。',
|
noResults: '无结果。',
|
||||||
selectPlaceholder: '请选择',
|
selectPlaceholder: '请选择',
|
||||||
@ -684,6 +685,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于
|
|||||||
tocEnhanceTip: `解析文档时生成了目录信息(见General方法的‘启用目录抽取’),让大模型返回和用户问题相关的目录项,从而利用目录项拿到相关chunk,对这些chunk在排序中进行加权。这种方法来源于模仿人类查询书本中知识的行为逻辑`,
|
tocEnhanceTip: `解析文档时生成了目录信息(见General方法的‘启用目录抽取’),让大模型返回和用户问题相关的目录项,从而利用目录项拿到相关chunk,对这些chunk在排序中进行加权。这种方法来源于模仿人类查询书本中知识的行为逻辑`,
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
|
edit: '编辑',
|
||||||
cropTip: '拖动选区可以选择要图片的裁剪位置,滚动可以放大/缩小选区',
|
cropTip: '拖动选区可以选择要图片的裁剪位置,滚动可以放大/缩小选区',
|
||||||
cropImage: '剪裁图片',
|
cropImage: '剪裁图片',
|
||||||
selectModelPlaceholder: '请选择模型',
|
selectModelPlaceholder: '请选择模型',
|
||||||
|
|||||||
@ -40,17 +40,17 @@ const AddDataSourceModal = ({
|
|||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col gap-4">
|
||||||
{sourceData?.icon}
|
<div className="size-6">{sourceData?.icon}</div>
|
||||||
{t('setting.addDataSourceModalTital', { name: sourceData?.name })}
|
{t('setting.addDataSourceModalTital', { name: sourceData?.name })}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
open={visible || false}
|
open={visible || false}
|
||||||
onOpenChange={(open) => !open && hideModal?.()}
|
onOpenChange={(open) => !open && hideModal?.()}
|
||||||
// onOk={() => handleOk()}
|
// onOk={() => handleOk()}
|
||||||
okText={t('common.ok')}
|
okText={t('common.confirm')}
|
||||||
cancelText={t('common.cancel')}
|
cancelText={t('common.cancel')}
|
||||||
showfooter={false}
|
footer={<div className="p-4"></div>}
|
||||||
>
|
>
|
||||||
<DynamicForm.Root
|
<DynamicForm.Root
|
||||||
fields={fields}
|
fields={fields}
|
||||||
@ -63,7 +63,7 @@ const AddDataSourceModal = ({
|
|||||||
] as FieldValues
|
] as FieldValues
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-end w-full gap-2 py-4">
|
<div className=" absolute bottom-0 right-0 left-0 flex items-center justify-end w-full gap-2 py-6 px-6">
|
||||||
<DynamicForm.CancelButton
|
<DynamicForm.CancelButton
|
||||||
handleCancel={() => {
|
handleCancel={() => {
|
||||||
hideModal?.();
|
hideModal?.();
|
||||||
@ -71,7 +71,7 @@ const AddDataSourceModal = ({
|
|||||||
/>
|
/>
|
||||||
<DynamicForm.SavingButton
|
<DynamicForm.SavingButton
|
||||||
submitLoading={loading || false}
|
submitLoading={loading || false}
|
||||||
buttonText={t('common.ok')}
|
buttonText={t('common.confirm')}
|
||||||
submitFunc={(values: FieldValues) => {
|
submitFunc={(values: FieldValues) => {
|
||||||
handleOk(values);
|
handleOk(values);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import { Button } from '@/components/ui/button';
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
||||||
import { Settings, Trash2 } from 'lucide-react';
|
import { Settings, Trash2 } from 'lucide-react';
|
||||||
@ -32,17 +33,19 @@ export const AddedSourceCard = (props: IAddedSourceCardProps) => {
|
|||||||
>
|
>
|
||||||
<div className="text-sm text-text-secondary ">{item.name}</div>
|
<div className="text-sm text-text-secondary ">{item.name}</div>
|
||||||
<div className="text-sm text-text-secondary flex gap-2">
|
<div className="text-sm text-text-secondary flex gap-2">
|
||||||
<Settings
|
<Button
|
||||||
className="cursor-pointer"
|
variant={'ghost'}
|
||||||
size={14}
|
className="rounded-lg px-2 py-1 bg-transparent hover:bg-bg-card"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
toDetail(item.id);
|
toDetail(item.id);
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
|
<Settings size={14} />
|
||||||
|
</Button>
|
||||||
{/* <ConfirmDeleteDialog onOk={() => handleDelete(item)}> */}
|
{/* <ConfirmDeleteDialog onOk={() => handleDelete(item)}> */}
|
||||||
<Trash2
|
<Button
|
||||||
className="cursor-pointer"
|
variant={'ghost'}
|
||||||
size={14}
|
className="rounded-lg px-2 py-1 bg-transparent hover:bg-state-error-5 hover:text-state-error"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
delSourceModal({
|
delSourceModal({
|
||||||
data: item,
|
data: item,
|
||||||
@ -51,7 +54,9 @@ export const AddedSourceCard = (props: IAddedSourceCardProps) => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
>
|
||||||
|
<Trash2 className="cursor-pointer" size={14} />
|
||||||
|
</Button>
|
||||||
{/* </ConfirmDeleteDialog> */}
|
{/* </ConfirmDeleteDialog> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -71,6 +71,7 @@ export default function McpServer() {
|
|||||||
className="w-40"
|
className="w-40"
|
||||||
value={searchString}
|
value={searchString}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
|
placeholder={t('common.search')}
|
||||||
></SearchInput>
|
></SearchInput>
|
||||||
<Button variant={'secondary'} onClick={switchSelectionMode}>
|
<Button variant={'secondary'} onClick={switchSelectionMode}>
|
||||||
{isSelectionMode ? (
|
{isSelectionMode ? (
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { ConfirmDeleteDialog } from '@/components/confirm-delete-dialog';
|
import { ConfirmDeleteDialog } from '@/components/confirm-delete-dialog';
|
||||||
import { RAGFlowTooltip } from '@/components/ui/tooltip';
|
|
||||||
import { useDeleteMcpServer } from '@/hooks/use-mcp-request';
|
import { useDeleteMcpServer } from '@/hooks/use-mcp-request';
|
||||||
import { PenLine, Trash2, Upload } from 'lucide-react';
|
import { PenLine, Trash2, Upload } from 'lucide-react';
|
||||||
import { MouseEventHandler, useCallback } from 'react';
|
import { MouseEventHandler, useCallback } from 'react';
|
||||||
@ -20,24 +19,24 @@ export function McpOperation({
|
|||||||
}, [deleteMcpServer, mcpId]);
|
}, [deleteMcpServer, mcpId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="hidden gap-3 group-hover:flex text-text-secondary">
|
<div className="hidden gap-1 group-hover:flex text-text-secondary">
|
||||||
<RAGFlowTooltip tooltip={t('mcp.export')}>
|
{/* <RAGFlowTooltip tooltip={t('mcp.export')}> */}
|
||||||
<Upload
|
<Upload
|
||||||
className="size-3 cursor-pointer"
|
className="size-5 cursor-pointer p-1 rounded-sm hover:text-text-primary hover:bg-bg-card"
|
||||||
onClick={handleExportMcpJson([mcpId])}
|
onClick={handleExportMcpJson([mcpId])}
|
||||||
/>
|
/>
|
||||||
</RAGFlowTooltip>
|
{/* </RAGFlowTooltip>
|
||||||
<RAGFlowTooltip tooltip={t('common.edit')}>
|
<RAGFlowTooltip tooltip={t('common.edit')}> */}
|
||||||
<PenLine
|
<PenLine
|
||||||
className="size-3 cursor-pointer"
|
className="size-5 cursor-pointer p-1 rounded-sm hover:text-text-primary hover:bg-bg-card"
|
||||||
onClick={showEditModal(mcpId)}
|
onClick={showEditModal(mcpId)}
|
||||||
/>
|
/>
|
||||||
</RAGFlowTooltip>
|
{/* </RAGFlowTooltip>
|
||||||
<RAGFlowTooltip tooltip={t('common.delete')}>
|
<RAGFlowTooltip tooltip={t('common.delete')}> */}
|
||||||
<ConfirmDeleteDialog onOk={handleDelete}>
|
<ConfirmDeleteDialog onOk={handleDelete}>
|
||||||
<Trash2 className="size-3 cursor-pointer" />
|
<Trash2 className="size-5 cursor-pointer p-1 rounded-sm hover:text-state-error hover:bg-state-error-5" />
|
||||||
</ConfirmDeleteDialog>
|
</ConfirmDeleteDialog>
|
||||||
</RAGFlowTooltip>
|
{/* </RAGFlowTooltip> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,12 +143,12 @@ const ProfilePage: FC = () => {
|
|||||||
{profile.userName}
|
{profile.userName}
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant={'secondary'}
|
variant={'ghost'}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleEditClick(EditType.editName)}
|
onClick={() => handleEditClick(EditType.editName)}
|
||||||
className="text-sm text-text-secondary flex gap-1 px-1"
|
className="text-sm text-text-secondary flex gap-1 px-1 border border-border-button"
|
||||||
>
|
>
|
||||||
<PenLine size={12} /> Edit
|
<PenLine size={12} /> {t('edit')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -175,12 +175,12 @@ const ProfilePage: FC = () => {
|
|||||||
{profile.timeZone}
|
{profile.timeZone}
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant={'secondary'}
|
variant={'ghost'}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleEditClick(EditType.editTimeZone)}
|
onClick={() => handleEditClick(EditType.editTimeZone)}
|
||||||
className="text-sm text-text-secondary flex gap-1 px-1"
|
className="text-sm text-text-secondary flex gap-1 px-1 border border-border-button"
|
||||||
>
|
>
|
||||||
<PenLine size={12} /> Edit
|
<PenLine size={12} /> {t('edit')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -208,12 +208,12 @@ const ProfilePage: FC = () => {
|
|||||||
{profile.currPasswd ? '********' : ''}
|
{profile.currPasswd ? '********' : ''}
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant={'secondary'}
|
variant={'ghost'}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleEditClick(EditType.editPassword)}
|
onClick={() => handleEditClick(EditType.editPassword)}
|
||||||
className="text-sm text-text-secondary flex gap-1 px-1"
|
className="text-sm text-text-secondary flex gap-1 px-1 border border-border-button"
|
||||||
>
|
>
|
||||||
<PenLine size={12} /> Edit
|
<PenLine size={12} /> {t('edit')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -304,7 +304,7 @@ const ProfilePage: FC = () => {
|
|||||||
<div className="flex flex-col w-full gap-2">
|
<div className="flex flex-col w-full gap-2">
|
||||||
<FormLabel
|
<FormLabel
|
||||||
required
|
required
|
||||||
className="text-sm flex justify-between text-text-secondary whitespace-nowrap"
|
className="text-sm flex text-text-secondary whitespace-nowrap"
|
||||||
>
|
>
|
||||||
{t('currentPassword')}
|
{t('currentPassword')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|||||||
@ -67,21 +67,22 @@ export const ModelProviderCard: FC<IModelCardProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div className={`w-full rounded-lg border border-border-button`}>
|
<div className={`w-full rounded-lg border border-border-button`}>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex h-16 items-center justify-between p-4 cursor-pointer transition-colors">
|
<div className="flex h-16 items-center justify-between p-4 cursor-pointer transition-colors text-text-secondary">
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<LlmIcon name={item.name} />
|
<LlmIcon name={item.name} />
|
||||||
<div>
|
<div>
|
||||||
<h3 className="font-medium">{item.name}</h3>
|
<div className="font-medium text-xl">{item.name}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<Button
|
<Button
|
||||||
|
variant={'ghost'}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
handleApiKeyClick();
|
handleApiKeyClick();
|
||||||
}}
|
}}
|
||||||
className="px-3 py-1 text-sm bg-bg-input hover:bg-bg-input text-text-primary rounded-md transition-colors flex items-center space-x-1"
|
className="px-3 py-1 text-sm rounded-md transition-colors flex items-center space-x-1 border border-border-default"
|
||||||
>
|
>
|
||||||
<SettingOutlined />
|
<SettingOutlined />
|
||||||
<span>
|
<span>
|
||||||
@ -90,23 +91,24 @@ export const ModelProviderCard: FC<IModelCardProps> = ({
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
variant={'ghost'}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
handleShowMoreClick();
|
handleShowMoreClick();
|
||||||
}}
|
}}
|
||||||
className="px-3 py-1 text-sm bg-bg-input hover:bg-bg-input text-text-primary rounded-md transition-colors flex items-center space-x-1"
|
className="px-3 py-1 text-sm rounded-md transition-colors flex items-center space-x-1 border border-border-default"
|
||||||
>
|
>
|
||||||
<span>{visible ? t('hideModels') : t('showMoreModels')}</span>
|
<span>{visible ? t('hideModels') : t('showMoreModels')}</span>
|
||||||
{!visible ? <ChevronsDown /> : <ChevronsUp />}
|
{!visible ? <ChevronsDown /> : <ChevronsUp />}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant={'secondary'}
|
variant={'ghost'}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
handleDeleteFactory();
|
handleDeleteFactory();
|
||||||
}}
|
}}
|
||||||
className="p-1 text-text-primary hover:text-state-error transition-colors"
|
className=" hover:text-state-error hover:bg-state-error-5 transition-colors border border-border-default"
|
||||||
>
|
>
|
||||||
<Trash2 />
|
<Trash2 />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -27,7 +27,6 @@ interface IProps {
|
|||||||
const SystemSetting = ({ onOk, loading }: IProps) => {
|
const SystemSetting = ({ onOk, loading }: IProps) => {
|
||||||
const { systemSetting: initialValues, allOptions } =
|
const { systemSetting: initialValues, allOptions } =
|
||||||
useFetchSystemModelSettingOnMount();
|
useFetchSystemModelSettingOnMount();
|
||||||
const { t: tcommon } = useTranslate('common');
|
|
||||||
const { t } = useTranslate('setting');
|
const { t } = useTranslate('setting');
|
||||||
|
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
@ -149,7 +148,7 @@ const SystemSetting = ({ onOk, loading }: IProps) => {
|
|||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<CircleQuestionMark
|
<CircleQuestionMark
|
||||||
size={12}
|
size={12}
|
||||||
className="ml-1 text-text-disabled text-xs"
|
className="ml-1 text-text-secondary text-xs"
|
||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// src/components/AvailableModels.tsx
|
// src/components/AvailableModels.tsx
|
||||||
import { LlmIcon } from '@/components/svg-icon';
|
import { LlmIcon } from '@/components/svg-icon';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
|
import { Input } from '@/components/ui/input';
|
||||||
import { useTranslate } from '@/hooks/common-hooks';
|
import { useTranslate } from '@/hooks/common-hooks';
|
||||||
import { useSelectLlmList } from '@/hooks/llm-hooks';
|
import { useSelectLlmList } from '@/hooks/llm-hooks';
|
||||||
import { Plus, Search } from 'lucide-react';
|
import { Plus, Search } from 'lucide-react';
|
||||||
@ -77,12 +78,12 @@ export const AvailableModels: FC<{
|
|||||||
{/* Search Bar */}
|
{/* Search Bar */}
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder={t('search')}
|
placeholder={t('search')}
|
||||||
value={searchTerm}
|
value={searchTerm}
|
||||||
onChange={(e) => setSearchTerm(e.target.value)}
|
onChange={(e) => setSearchTerm(e.target.value)}
|
||||||
className="w-full px-4 py-3 pl-10 bg-bg-input border border-border-default rounded-lg focus:outline-none focus:ring-1 focus:ring-border-button transition-colors"
|
className="w-full px-4 py-2 pl-10 bg-bg-input border border-border-default rounded-lg focus:outline-none focus:ring-1 focus:ring-border-button transition-colors"
|
||||||
/>
|
/>
|
||||||
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-text-secondary" />
|
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-text-secondary" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -72,7 +72,7 @@ const TenantTable = ({ searchTerm }: { searchTerm: string }) => {
|
|||||||
<div className="rounded-lg bg-bg-input scrollbar-auto overflow-hidden border border-border-default">
|
<div className="rounded-lg bg-bg-input scrollbar-auto overflow-hidden border border-border-default">
|
||||||
<Table rootClassName="rounded-lg">
|
<Table rootClassName="rounded-lg">
|
||||||
<TableHeader className="bg-bg-title">
|
<TableHeader className="bg-bg-title">
|
||||||
<TableRow>
|
<TableRow className="hover:bg-bg-title">
|
||||||
<TableHead className="h-12 px-4">{t('common.name')}</TableHead>
|
<TableHead className="h-12 px-4">{t('common.name')}</TableHead>
|
||||||
<TableHead
|
<TableHead
|
||||||
className="h-12 px-4 cursor-pointer"
|
className="h-12 px-4 cursor-pointer"
|
||||||
|
|||||||
@ -78,7 +78,7 @@ const UserTable = ({ searchUser }: { searchUser: string }) => {
|
|||||||
<div className="rounded-lg bg-bg-input scrollbar-auto overflow-hidden border border-border-default">
|
<div className="rounded-lg bg-bg-input scrollbar-auto overflow-hidden border border-border-default">
|
||||||
<Table rootClassName="rounded-lg">
|
<Table rootClassName="rounded-lg">
|
||||||
<TableHeader className="bg-bg-title">
|
<TableHeader className="bg-bg-title">
|
||||||
<TableRow>
|
<TableRow className="hover:bg-bg-title">
|
||||||
<TableHead className="h-12 px-4">{t('common.name')}</TableHead>
|
<TableHead className="h-12 px-4">{t('common.name')}</TableHead>
|
||||||
<TableHead
|
<TableHead
|
||||||
className="h-12 px-4 cursor-pointer"
|
className="h-12 px-4 cursor-pointer"
|
||||||
|
|||||||
Reference in New Issue
Block a user