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:
Joel
2025-03-21 17:41:03 +08:00
committed by GitHub
parent e61415223b
commit 7709d9df20
1435 changed files with 13372 additions and 11612 deletions

View File

@@ -27,13 +27,13 @@ const ModerationContent: FC<ModerationContentProps> = ({
return (
<div className='py-2'>
<div className='rounded-lg bg-components-panel-bg border border-components-panel-border'>
<div className='flex items-center justify-between px-3 h-10 rounded-lg'>
<div className='rounded-lg border border-components-panel-border bg-components-panel-bg'>
<div className='flex h-10 items-center justify-between rounded-lg px-3'>
<div className='shrink-0 text-sm font-medium text-text-primary'>{title}</div>
<div className='grow flex items-center justify-end'>
<div className='flex grow items-center justify-end'>
{
info && (
<div className='mr-2 text-xs text-text-tertiary truncate' title={info}>{info}</div>
<div className='mr-2 truncate text-xs text-text-tertiary' title={info}>{info}</div>
)
}
<Switch
@@ -45,19 +45,19 @@ const ModerationContent: FC<ModerationContentProps> = ({
</div>
{
config.enabled && showPreset && (
<div className='px-3 pt-1 pb-3 bg-components-panel-bg rounded-lg'>
<div className='flex items-center justify-between h-8 text-[13px] font-medium text-text-secondary'>
<div className='rounded-lg bg-components-panel-bg px-3 pb-3 pt-1'>
<div className='flex h-8 items-center justify-between text-[13px] font-medium text-text-secondary'>
{t('appDebug.feature.moderation.modal.content.preset')}
<span className='text-xs font-normal text-text-tertiary'>{t('appDebug.feature.moderation.modal.content.supportMarkdown')}</span>
</div>
<div className='relative px-3 py-2 h-20 rounded-lg bg-components-input-bg-normal'>
<div className='relative h-20 rounded-lg bg-components-input-bg-normal px-3 py-2'>
<textarea
value={config.preset_response || ''}
className='block w-full h-full bg-transparent text-sm text-text-secondary outline-none appearance-none resize-none'
className='block h-full w-full resize-none appearance-none bg-transparent text-sm text-text-secondary outline-none'
placeholder={t('appDebug.feature.moderation.modal.content.placeholder') || ''}
onChange={e => handleConfigChange('preset_response', e.target.value)}
/>
<div className='absolute bottom-2 right-2 flex items-center px-1 h-5 rounded-md bg-background-section text-xs font-medium text-text-quaternary'>
<div className='absolute bottom-2 right-2 flex h-5 items-center rounded-md bg-background-section px-1 text-xs font-medium text-text-quaternary'>
<span>{(config.preset_response || '').length}</span>/<span className='text-text-tertiary'>100</span>
</div>
</div>