Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
@@ -101,8 +101,8 @@ const ImageInput: FC<UploaderProps> = ({
|
||||
{
|
||||
!inputImage
|
||||
? <>
|
||||
<ImagePlus className="w-[30px] h-[30px] mb-3 pointer-events-none" />
|
||||
<div className="text-sm font-medium mb-[2px]">
|
||||
<ImagePlus className="pointer-events-none mb-3 h-[30px] w-[30px]" />
|
||||
<div className="mb-[2px] text-sm font-medium">
|
||||
<span className="pointer-events-none">Drop your image here, or </span>
|
||||
<button className="text-components-button-primary-bg" onClick={() => inputRef.current?.click()}>browse</button>
|
||||
<input
|
||||
@@ -112,7 +112,7 @@ const ImageInput: FC<UploaderProps> = ({
|
||||
onChange={handleLocalFileInput}
|
||||
/>
|
||||
</div>
|
||||
<div className="text-xs pointer-events-none">Supports PNG, JPG, JPEG, WEBP and GIF</div>
|
||||
<div className="pointer-events-none text-xs">Supports PNG, JPG, JPEG, WEBP and GIF</div>
|
||||
</>
|
||||
: handleShowImage()
|
||||
}
|
||||
|
@@ -113,13 +113,13 @@ const AppIconPicker: FC<AppIconPickerProps> = ({
|
||||
wrapperClassName={className}
|
||||
className={cn(s.container, '!w-[362px] !p-0')}
|
||||
>
|
||||
{!DISABLE_UPLOAD_IMAGE_AS_ICON && <div className="p-2 pb-0 w-full">
|
||||
<div className='p-1 flex items-center justify-center gap-2 bg-background-body rounded-xl'>
|
||||
{!DISABLE_UPLOAD_IMAGE_AS_ICON && <div className="w-full p-2 pb-0">
|
||||
<div className='flex items-center justify-center gap-2 rounded-xl bg-background-body p-1'>
|
||||
{tabs.map(tab => (
|
||||
<button
|
||||
key={tab.key}
|
||||
className={`
|
||||
p-2 flex-1 flex justify-center items-center h-8 rounded-xl text-sm shrink-0 font-medium
|
||||
flex h-8 flex-1 shrink-0 items-center justify-center rounded-xl p-2 text-sm font-medium
|
||||
${activeTab === tab.key && 'bg-components-main-nav-nav-button-bg-active shadow-md'}
|
||||
`}
|
||||
onClick={() => setActiveTab(tab.key as AppIconType)}
|
||||
@@ -134,7 +134,7 @@ const AppIconPicker: FC<AppIconPickerProps> = ({
|
||||
<ImageInput className={activeTab === 'image' ? 'block' : 'hidden'} onImageInput={handleImageInput} />
|
||||
|
||||
<Divider className='m-0' />
|
||||
<div className='w-full flex items-center justify-center p-3 gap-2'>
|
||||
<div className='flex w-full items-center justify-center gap-2 p-3'>
|
||||
<Button className='w-full' onClick={() => onClose?.()}>
|
||||
{t('app.iconPicker.cancel')}
|
||||
</Button>
|
||||
|
Reference in New Issue
Block a user