mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 21:45:56 +08:00
Feat: configure dark mode legacy (#15394)
This commit is contained in:
parent
2cf0cb471f
commit
9e220d5d30
@ -11,7 +11,7 @@ const GroupName: FC<IGroupNameProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center mb-1'>
|
<div className='flex items-center mb-1'>
|
||||||
<div className='mr-3 leading-[18px] text-xs font-semibold text-gray-500 uppercase'>{name}</div>
|
<div className='mr-3 leading-[18px] text-xs font-semibold text-text-tertiary uppercase'>{name}</div>
|
||||||
<div className='grow h-[1px]'
|
<div className='grow h-[1px]'
|
||||||
style={{
|
style={{
|
||||||
background: 'linear-gradient(270deg, rgba(243, 244, 246, 0) 0%, #F3F4F6 100%)',
|
background: 'linear-gradient(270deg, rgba(243, 244, 246, 0) 0%, #F3F4F6 100%)',
|
||||||
|
@ -20,6 +20,7 @@ import {
|
|||||||
Clipboard,
|
Clipboard,
|
||||||
ClipboardCheck,
|
ClipboardCheck,
|
||||||
} from '@/app/components/base/icons/src/vender/line/files'
|
} from '@/app/components/base/icons/src/vender/line/files'
|
||||||
|
import Button from '@/app/components/base/button'
|
||||||
import Tooltip from '@/app/components/base/tooltip'
|
import Tooltip from '@/app/components/base/tooltip'
|
||||||
import PromptEditor from '@/app/components/base/prompt-editor'
|
import PromptEditor from '@/app/components/base/prompt-editor'
|
||||||
import ConfigContext from '@/context/debug-configuration'
|
import ConfigContext from '@/context/debug-configuration'
|
||||||
@ -150,19 +151,20 @@ const AdvancedPromptInput: FC<Props> = ({
|
|||||||
<RiErrorWarningFill className='mr-1 w-4 h-4 text-[#F79009]' />
|
<RiErrorWarningFill className='mr-1 w-4 h-4 text-[#F79009]' />
|
||||||
<div className='leading-[18px] text-[13px] font-medium text-[#DC6803]'>{t('appDebug.promptMode.contextMissing')}</div>
|
<div className='leading-[18px] text-[13px] font-medium text-[#DC6803]'>{t('appDebug.promptMode.contextMissing')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<Button
|
||||||
className='flex items-center h-6 px-2 rounded-md bg-[#fff] border border-gray-200 shadow-xs text-xs font-medium text-primary-600 cursor-pointer'
|
size='small'
|
||||||
|
variant='secondary-accent'
|
||||||
onClick={onHideContextMissingTip}
|
onClick={onHideContextMissingTip}
|
||||||
>{t('common.operation.ok')}</div>
|
>{t('common.operation.ok')}</Button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
<div className={`relative ${!isContextMissing ? s.gradientBorder : s.warningBorder}`}>
|
<div className={`bg-gradient-to-r from-components-input-border-active-prompt-1 to-components-input-border-active-prompt-2 rounded-xl p-0.5 shadow-xs ${!isContextMissing ? '' : s.warningBorder}`}>
|
||||||
<div className='rounded-xl bg-white'>
|
<div className='rounded-xl bg-background-default'>
|
||||||
{isContextMissing
|
{isContextMissing
|
||||||
? contextMissing
|
? contextMissing
|
||||||
: (
|
: (
|
||||||
<div className={cn(s.boxHeader, 'flex justify-between items-center h-11 pt-2 pr-3 pb-1 pl-4 rounded-tl-xl rounded-tr-xl bg-white hover:shadow-xs')}>
|
<div className={cn(s.boxHeader, 'flex justify-between items-center h-11 pt-2 pr-3 pb-1 pl-4 rounded-tl-xl rounded-tr-xl bg-background-default hover:shadow-xs')}>
|
||||||
{isChatMode
|
{isChatMode
|
||||||
? (
|
? (
|
||||||
<MessageTypeSelector value={type} onChange={onTypeChange} />
|
<MessageTypeSelector value={type} onChange={onTypeChange} />
|
||||||
@ -182,30 +184,30 @@ const AdvancedPromptInput: FC<Props> = ({
|
|||||||
</div>)}
|
</div>)}
|
||||||
<div className={cn(s.optionWrap, 'items-center space-x-1')}>
|
<div className={cn(s.optionWrap, 'items-center space-x-1')}>
|
||||||
{canDelete && (
|
{canDelete && (
|
||||||
<RiDeleteBinLine onClick={onDelete} className='h-6 w-6 p-1 text-gray-500 cursor-pointer' />
|
<RiDeleteBinLine onClick={onDelete} className='h-6 w-6 p-1 text-text-tertiary cursor-pointer' />
|
||||||
)}
|
)}
|
||||||
{!isCopied
|
{!isCopied
|
||||||
? (
|
? (
|
||||||
<Clipboard className='h-6 w-6 p-1 text-gray-500 cursor-pointer' onClick={() => {
|
<Clipboard className='h-6 w-6 p-1 text-text-tertiary cursor-pointer' onClick={() => {
|
||||||
copy(value)
|
copy(value)
|
||||||
setIsCopied(true)
|
setIsCopied(true)
|
||||||
}} />
|
}} />
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<ClipboardCheck className='h-6 w-6 p-1 text-gray-500' />
|
<ClipboardCheck className='h-6 w-6 p-1 text-text-tertiary' />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<PromptEditorHeightResizeWrap
|
<PromptEditorHeightResizeWrap
|
||||||
className='px-4 min-h-[102px] overflow-y-auto text-sm text-gray-700'
|
className='px-4 min-h-[102px] overflow-y-auto text-sm text-text-secondary'
|
||||||
height={editorHeight}
|
height={editorHeight}
|
||||||
minHeight={minHeight}
|
minHeight={minHeight}
|
||||||
onHeightChange={setEditorHeight}
|
onHeightChange={setEditorHeight}
|
||||||
footer={(
|
footer={(
|
||||||
<div className='pl-4 pb-2 flex'>
|
<div className='pl-4 pb-2 flex'>
|
||||||
<div className="h-[18px] leading-[18px] px-1 rounded-md bg-gray-100 text-xs text-gray-500">{value.length}</div>
|
<div className="h-[18px] leading-[18px] px-1 rounded-md bg-divider-regular text-xs text-text-tertiary">{value.length}</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
hideResize={noResize}
|
hideResize={noResize}
|
||||||
|
@ -39,21 +39,17 @@ const ConfirmAddVar: FC<IConfirmAddVarProps> = ({
|
|||||||
}}>
|
}}>
|
||||||
<div
|
<div
|
||||||
ref={mainContentRef}
|
ref={mainContentRef}
|
||||||
className='w-[420px] rounded-xl bg-gray-50 p-6'
|
className='w-[420px] rounded-xl bg-components-panel-bg p-6'
|
||||||
style={{
|
style={{
|
||||||
boxShadow: '0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03)',
|
boxShadow: '0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03)',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className='flex items-start space-x-3'>
|
<div className='flex items-start space-x-3'>
|
||||||
<div
|
<div
|
||||||
className='shrink-0 flex items-center justify-center h-10 w-10 rounded-xl border border-gray-100'
|
className='shrink-0 flex items-center justify-center h-10 w-10 bg-components-card-bg-alt rounded-xl border border-components-card-border shadow-lg'
|
||||||
style={{
|
|
||||||
backgroundColor: 'rgba(255, 255, 255, 0.9)',
|
|
||||||
boxShadow: '0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03)',
|
|
||||||
}}
|
|
||||||
>{VarIcon}</div>
|
>{VarIcon}</div>
|
||||||
<div className='grow-1'>
|
<div className='grow-1'>
|
||||||
<div className='text-sm font-medium text-gray-900'>{t('appDebug.autoAddVar')}</div>
|
<div className='text-sm font-medium text-text-primary'>{t('appDebug.autoAddVar')}</div>
|
||||||
<div className='flex flex-wrap mt-[15px] max-h-[66px] overflow-y-auto px-1 space-x-1'>
|
<div className='flex flex-wrap mt-[15px] max-h-[66px] overflow-y-auto px-1 space-x-1'>
|
||||||
{varNameArr.map(name => (
|
{varNameArr.map(name => (
|
||||||
<VarHighlight key={name} name={name} />
|
<VarHighlight key={name} name={name} />
|
||||||
|
@ -8,6 +8,7 @@ import {
|
|||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import SimplePromptInput from './simple-prompt-input'
|
import SimplePromptInput from './simple-prompt-input'
|
||||||
|
import Button from '@/app/components/base/button'
|
||||||
import AdvancedMessageInput from '@/app/components/app/configuration/config-prompt/advanced-prompt-input'
|
import AdvancedMessageInput from '@/app/components/app/configuration/config-prompt/advanced-prompt-input'
|
||||||
import { PromptRole } from '@/models/debug'
|
import { PromptRole } from '@/models/debug'
|
||||||
import type { PromptItem, PromptVariable } from '@/models/debug'
|
import type { PromptItem, PromptVariable } from '@/models/debug'
|
||||||
@ -155,12 +156,12 @@ const Prompt: FC<IPromptProps> = ({
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{(modelModeType === ModelModeType.chat && (currentAdvancedPrompt as PromptItem[]).length < MAX_PROMPT_MESSAGE_LENGTH) && (
|
{(modelModeType === ModelModeType.chat && (currentAdvancedPrompt as PromptItem[]).length < MAX_PROMPT_MESSAGE_LENGTH) && (
|
||||||
<div
|
<Button
|
||||||
onClick={handleAddMessage}
|
onClick={handleAddMessage}
|
||||||
className='mt-3 flex items-center h-8 justify-center bg-gray-50 rounded-lg cursor-pointer text-[13px] font-medium text-gray-700 space-x-2'>
|
className='mt-3 w-full'>
|
||||||
<RiAddLine className='w-4 h-4' />
|
<RiAddLine className='w-4 h-4 mr-2' />
|
||||||
<div>{t('appDebug.promptMode.operation.addMessage')}</div>
|
<div>{t('appDebug.promptMode.operation.addMessage')}</div>
|
||||||
</div>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -29,7 +29,7 @@ const MessageTypeSelector: FC<Props> = ({
|
|||||||
<ChevronSelectorVertical className='w-3 h-3 ' />
|
<ChevronSelectorVertical className='w-3 h-3 ' />
|
||||||
</div>
|
</div>
|
||||||
{showOption && (
|
{showOption && (
|
||||||
<div className='absolute z-10 top-[30px] p-1 border border-gray-200 shadow-lg rounded-lg bg-white'>
|
<div className='absolute z-10 top-[30px] p-1 border border-components-panel-border shadow-lg rounded-lg bg-components-panel-bg'>
|
||||||
{allTypes.map(type => (
|
{allTypes.map(type => (
|
||||||
<div
|
<div
|
||||||
key={type}
|
key={type}
|
||||||
@ -37,7 +37,7 @@ const MessageTypeSelector: FC<Props> = ({
|
|||||||
setHide()
|
setHide()
|
||||||
onChange(type)
|
onChange(type)
|
||||||
}}
|
}}
|
||||||
className='flex items-center h-9 min-w-[44px] px-3 rounded-lg cursor-pointer text-sm font-medium text-gray-700 uppercase hover:bg-gray-50'
|
className='flex items-center h-9 min-w-[44px] px-3 rounded-lg cursor-pointer text-sm font-medium text-text-secondary uppercase hover:bg-state-base-hover'
|
||||||
>{type}</div>
|
>{type}</div>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import { useBoolean } from 'ahooks'
|
|||||||
import produce from 'immer'
|
import produce from 'immer'
|
||||||
import { useContext } from 'use-context-selector'
|
import { useContext } from 'use-context-selector'
|
||||||
import ConfirmAddVar from './confirm-add-var'
|
import ConfirmAddVar from './confirm-add-var'
|
||||||
import s from './style.module.css'
|
|
||||||
import PromptEditorHeightResizeWrap from './prompt-editor-height-resize-wrap'
|
import PromptEditorHeightResizeWrap from './prompt-editor-height-resize-wrap'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import type { PromptVariable } from '@/models/debug'
|
import type { PromptVariable } from '@/models/debug'
|
||||||
@ -48,7 +47,6 @@ const Prompt: FC<ISimplePromptInput> = ({
|
|||||||
readonly = false,
|
readonly = false,
|
||||||
onChange,
|
onChange,
|
||||||
noTitle,
|
noTitle,
|
||||||
gradientBorder,
|
|
||||||
editorHeight: initEditorHeight,
|
editorHeight: initEditorHeight,
|
||||||
noResize,
|
noResize,
|
||||||
}) => {
|
}) => {
|
||||||
@ -161,12 +159,12 @@ const Prompt: FC<ISimplePromptInput> = ({
|
|||||||
const [editorHeight, setEditorHeight] = useState(minHeight)
|
const [editorHeight, setEditorHeight] = useState(minHeight)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn((!readonly || gradientBorder) ? `${s.gradientBorder}` : 'bg-gray-50', ' relative shadow-md')}>
|
<div className={cn('relative bg-gradient-to-r from-components-input-border-active-prompt-1 to-components-input-border-active-prompt-2 rounded-xl p-0.5 shadow-xs')}>
|
||||||
<div className='rounded-xl bg-[#EEF4FF]'>
|
<div className='rounded-xl bg-background-section-burn'>
|
||||||
{!noTitle && (
|
{!noTitle && (
|
||||||
<div className="flex justify-between items-center h-11 pl-3 pr-6">
|
<div className="flex justify-between items-center h-11 pl-3 pr-2.5">
|
||||||
<div className="flex items-center space-x-1">
|
<div className="flex items-center space-x-1">
|
||||||
<div className='h2'>{mode !== AppType.completion ? t('appDebug.chatSubTitle') : t('appDebug.completionSubTitle')}</div>
|
<div className='h2 system-sm-semibold-uppercase text-text-secondary'>{mode !== AppType.completion ? t('appDebug.chatSubTitle') : t('appDebug.completionSubTitle')}</div>
|
||||||
{!readonly && (
|
{!readonly && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
popupContent={
|
popupContent={
|
||||||
@ -186,14 +184,14 @@ const Prompt: FC<ISimplePromptInput> = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<PromptEditorHeightResizeWrap
|
<PromptEditorHeightResizeWrap
|
||||||
className='px-4 pt-2 min-h-[228px] bg-white rounded-t-xl text-sm text-gray-700'
|
className='px-4 pt-2 min-h-[228px] bg-background-default rounded-t-xl text-sm text-text-secondary'
|
||||||
height={editorHeight}
|
height={editorHeight}
|
||||||
minHeight={minHeight}
|
minHeight={minHeight}
|
||||||
onHeightChange={setEditorHeight}
|
onHeightChange={setEditorHeight}
|
||||||
hideResize={noResize}
|
hideResize={noResize}
|
||||||
footer={(
|
footer={(
|
||||||
<div className='pl-4 pb-2 flex bg-white rounded-b-xl'>
|
<div className='pl-4 pb-2 flex bg-background-default rounded-b-xl'>
|
||||||
<div className="h-[18px] leading-[18px] px-1 rounded-md bg-gray-100 text-xs text-gray-500">{promptTemplate.length}</div>
|
<div className="h-[18px] leading-[18px] px-1 rounded-md bg-components-badge-bg-gray-soft text-xs text-text-tertiary">{promptTemplate.length}</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Generator } from '@/app/components/base/icons/src/vender/other'
|
import {
|
||||||
|
RiSparklingFill,
|
||||||
|
} from '@remixicon/react'
|
||||||
|
import Button from '@/app/components/base/button'
|
||||||
|
|
||||||
export type IAutomaticBtnProps = {
|
export type IAutomaticBtnProps = {
|
||||||
onClick: () => void
|
onClick: () => void
|
||||||
@ -13,12 +16,10 @@ const AutomaticBtn: FC<IAutomaticBtnProps> = ({
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex space-x-1 items-center !h-8 cursor-pointer'
|
<Button variant='secondary-accent' size='small' onClick={onClick}>
|
||||||
onClick={onClick}
|
<RiSparklingFill className='w-3.5 h-3.5 mr-1' />
|
||||||
>
|
<span className=''>{t('appDebug.operation.automatic')}</span>
|
||||||
<Generator className='w-3.5 h-3.5 text-indigo-600' />
|
</Button>
|
||||||
<span className='text-xs font-semibold text-indigo-600'>{t('appDebug.operation.automatic')}</span>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default React.memo(AutomaticBtn)
|
export default React.memo(AutomaticBtn)
|
||||||
|
@ -38,7 +38,7 @@ import ModelName from '@/app/components/header/account-setting/model-provider-pa
|
|||||||
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||||
import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'
|
import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'
|
||||||
|
|
||||||
export interface IGetAutomaticResProps {
|
export type IGetAutomaticResProps = {
|
||||||
mode: AppType
|
mode: AppType
|
||||||
model: Model
|
model: Model
|
||||||
isShow: boolean
|
isShow: boolean
|
||||||
@ -54,11 +54,11 @@ const TryLabel: FC<{
|
|||||||
}> = ({ Icon, text, onClick }) => {
|
}> = ({ Icon, text, onClick }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className='mt-2 mr-1 shrink-0 flex h-7 items-center px-2 bg-gray-100 rounded-lg cursor-pointer'
|
className='mt-2 mr-1 shrink-0 flex h-7 items-center px-2 bg-components-button-secondary-bg rounded-lg cursor-pointer'
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<Icon className='w-4 h-4 text-gray-500'></Icon>
|
<Icon className='w-4 h-4 text-text-tertiary'></Icon>
|
||||||
<div className='ml-1 text-xs font-medium text-gray-700'>{text}</div>
|
<div className='ml-1 text-xs font-medium text-text-secondary'>{text}</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -140,14 +140,14 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|||||||
const renderLoading = (
|
const renderLoading = (
|
||||||
<div className='w-0 grow flex flex-col items-center justify-center h-full space-y-3'>
|
<div className='w-0 grow flex flex-col items-center justify-center h-full space-y-3'>
|
||||||
<Loading />
|
<Loading />
|
||||||
<div className='text-[13px] text-gray-400'>{t('appDebug.generate.loading')}</div>
|
<div className='text-[13px] text-text-tertiary'>{t('appDebug.generate.loading')}</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
const renderNoData = (
|
const renderNoData = (
|
||||||
<div className='w-0 grow flex flex-col items-center px-8 justify-center h-full space-y-3'>
|
<div className='w-0 grow flex flex-col items-center px-8 justify-center h-full space-y-3'>
|
||||||
<Generator className='w-14 h-14 text-gray-300' />
|
<Generator className='w-14 h-14 text-text-tertiary' />
|
||||||
<div className='leading-5 text-center text-[13px] font-normal text-gray-400'>
|
<div className='leading-5 text-center text-[13px] font-normal text-text-tertiary'>
|
||||||
<div>{t('appDebug.generate.noDataLine1')}</div>
|
<div>{t('appDebug.generate.noDataLine1')}</div>
|
||||||
<div>{t('appDebug.generate.noDataLine2')}</div>
|
<div>{t('appDebug.generate.noDataLine2')}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -193,10 +193,10 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|||||||
closable
|
closable
|
||||||
>
|
>
|
||||||
<div className='flex h-[680px] flex-wrap'>
|
<div className='flex h-[680px] flex-wrap'>
|
||||||
<div className='w-[570px] shrink-0 p-6 h-full overflow-y-auto border-r border-gray-100'>
|
<div className='w-[570px] shrink-0 p-6 h-full overflow-y-auto border-r border-divider-regular'>
|
||||||
<div className='mb-8'>
|
<div className='mb-8'>
|
||||||
<div className={`leading-[28px] text-lg font-bold ${s.textGradient}`}>{t('appDebug.generate.title')}</div>
|
<div className={`leading-[28px] text-lg font-bold ${s.textGradient}`}>{t('appDebug.generate.title')}</div>
|
||||||
<div className='mt-1 text-[13px] font-normal text-gray-500'>{t('appDebug.generate.description')}</div>
|
<div className='mt-1 text-[13px] font-normal text-text-tertiary'>{t('appDebug.generate.description')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex items-center mb-8'>
|
<div className='flex items-center mb-8'>
|
||||||
<ModelIcon
|
<ModelIcon
|
||||||
@ -213,7 +213,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
<div className='flex items-center'>
|
<div className='flex items-center'>
|
||||||
<div className='mr-3 shrink-0 leading-[18px] text-xs font-semibold text-gray-500 uppercase'>{t('appDebug.generate.tryIt')}</div>
|
<div className='mr-3 shrink-0 leading-[18px] text-xs font-semibold text-text-tertiary uppercase'>{t('appDebug.generate.tryIt')}</div>
|
||||||
<div className='grow h-px' style={{
|
<div className='grow h-px' style={{
|
||||||
background: 'linear-gradient(to right, rgba(243, 244, 246, 1), rgba(243, 244, 246, 0))',
|
background: 'linear-gradient(to right, rgba(243, 244, 246, 1), rgba(243, 244, 246, 0))',
|
||||||
}}></div>
|
}}></div>
|
||||||
@ -232,7 +232,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|||||||
{/* inputs */}
|
{/* inputs */}
|
||||||
<div className='mt-6'>
|
<div className='mt-6'>
|
||||||
<div className='text-[0px]'>
|
<div className='text-[0px]'>
|
||||||
<div className='mb-2 leading-5 text-sm font-medium text-gray-900'>{t('appDebug.generate.instruction')}</div>
|
<div className='mb-2 leading-5 text-sm font-medium text-text-primary'>{t('appDebug.generate.instruction')}</div>
|
||||||
<Textarea
|
<Textarea
|
||||||
className="h-[200px] resize-none"
|
className="h-[200px] resize-none"
|
||||||
placeholder={t('appDebug.generate.instructionPlaceHolder') as string}
|
placeholder={t('appDebug.generate.instructionPlaceHolder') as string}
|
||||||
@ -256,7 +256,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|||||||
|
|
||||||
{(!isLoading && res) && (
|
{(!isLoading && res) && (
|
||||||
<div className='w-0 grow p-6 pb-0 h-full'>
|
<div className='w-0 grow p-6 pb-0 h-full'>
|
||||||
<div className='shrink-0 mb-3 leading-[160%] text-base font-semibold text-gray-800'>{t('appDebug.generate.resTitle')}</div>
|
<div className='shrink-0 mb-3 leading-[160%] text-base font-semibold text-text-secondary'>{t('appDebug.generate.resTitle')}</div>
|
||||||
<div className={cn('max-h-[555px] overflow-y-auto', !isInLLMNode && 'pb-2')}>
|
<div className={cn('max-h-[555px] overflow-y-auto', !isInLLMNode && 'pb-2')}>
|
||||||
<ConfigPrompt
|
<ConfigPrompt
|
||||||
mode={mode}
|
mode={mode}
|
||||||
@ -301,7 +301,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='flex justify-end py-4 bg-white'>
|
<div className='flex justify-end py-4 bg-background-default'>
|
||||||
<Button onClick={onClose}>{t('common.operation.cancel')}</Button>
|
<Button onClick={onClose}>{t('common.operation.cancel')}</Button>
|
||||||
<Button variant='primary' className='ml-2' onClick={() => {
|
<Button variant='primary' className='ml-2' onClick={() => {
|
||||||
setShowConfirmOverwrite(true)
|
setShowConfirmOverwrite(true)
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
.modal {
|
|
||||||
max-width: 480px !important;
|
|
||||||
width: 480px !important;
|
|
||||||
padding: 24px 32px !important;
|
|
||||||
}
|
|
@ -3,9 +3,8 @@ import { useTranslation } from 'react-i18next'
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import s from './index.module.css'
|
|
||||||
import classNames from '@/utils/classnames'
|
|
||||||
import Modal from '@/app/components/base/modal'
|
import Modal from '@/app/components/base/modal'
|
||||||
|
import Button from '@/app/components/base/button'
|
||||||
import type { LangGeniusVersionResponse } from '@/models/common'
|
import type { LangGeniusVersionResponse } from '@/models/common'
|
||||||
import { IS_CE_EDITION } from '@/config'
|
import { IS_CE_EDITION } from '@/config'
|
||||||
import LogoSite from '@/app/components/base/logo/logo-site'
|
import LogoSite from '@/app/components/base/logo/logo-site'
|
||||||
@ -29,18 +28,18 @@ export default function AccountAbout({
|
|||||||
<Modal
|
<Modal
|
||||||
isShow
|
isShow
|
||||||
onClose={() => { }}
|
onClose={() => { }}
|
||||||
className={s.modal}
|
className='!w-[480px] !max-w-[480px] !px-6 !py-4'
|
||||||
>
|
>
|
||||||
<div className='relative pt-4'>
|
<div className='relative pt-4'>
|
||||||
<div className='absolute -top-2 -right-4 flex justify-center items-center w-8 h-8 cursor-pointer' onClick={onCancel}>
|
<div className='absolute -top-2 -right-4 flex justify-center items-center w-8 h-8 cursor-pointer' onClick={onCancel}>
|
||||||
<RiCloseLine className='w-4 h-4 text-gray-500' />
|
<RiCloseLine className='w-4 h-4 text-text-tertiary' />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<LogoSite className='mx-auto mb-2' />
|
<LogoSite className='mx-auto mb-2' />
|
||||||
<div className='mb-3 text-center text-xs font-normal text-gray-500'>Version {langeniusVersionInfo?.current_version}</div>
|
<div className='mb-3 text-center text-xs font-normal text-text-tertiary'>Version {langeniusVersionInfo?.current_version}</div>
|
||||||
<div className='mb-4 text-center text-xs font-normal text-gray-700'>
|
<div className='mb-4 text-center text-xs font-normal text-text-secondary'>
|
||||||
<div>© {dayjs().year()} LangGenius, Inc., Contributors.</div>
|
<div>© {dayjs().year()} LangGenius, Inc., Contributors.</div>
|
||||||
<div className='text-[#1C64F2]'>
|
<div className='text-text-accent'>
|
||||||
{
|
{
|
||||||
IS_CE_EDITION
|
IS_CE_EDITION
|
||||||
? <Link href={'https://github.com/langgenius/dify/blob/main/LICENSE'} target='_blank' rel='noopener noreferrer'>Open Source License</Link>
|
? <Link href={'https://github.com/langgenius/dify/blob/main/LICENSE'} target='_blank' rel='noopener noreferrer'>Open Source License</Link>
|
||||||
@ -52,9 +51,9 @@ export default function AccountAbout({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='mb-4 -mx-8 h-[0.5px] bg-gray-200' />
|
<div className='mb-4 -mx-8 h-[0.5px] bg-divider-regular' />
|
||||||
<div className='flex justify-between items-center'>
|
<div className='flex justify-between items-center'>
|
||||||
<div className='text-xs font-medium text-gray-800'>
|
<div className='text-xs font-medium text-text-primary'>
|
||||||
{
|
{
|
||||||
isLatest
|
isLatest
|
||||||
? t('common.about.latestAvailable', { version: langeniusVersionInfo.latest_version })
|
? t('common.about.latestAvailable', { version: langeniusVersionInfo.latest_version })
|
||||||
@ -62,22 +61,24 @@ export default function AccountAbout({
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className='flex items-center'>
|
<div className='flex items-center'>
|
||||||
|
<Button className='mr-2'>
|
||||||
<Link
|
<Link
|
||||||
className={classNames(buttonClassName, 'mr-2')}
|
|
||||||
href={'https://github.com/langgenius/dify/releases'}
|
href={'https://github.com/langgenius/dify/releases'}
|
||||||
target='_blank' rel='noopener noreferrer'
|
target='_blank' rel='noopener noreferrer'
|
||||||
>
|
>
|
||||||
{t('common.about.changeLog')}
|
{t('common.about.changeLog')}
|
||||||
</Link>
|
</Link>
|
||||||
|
</Button>
|
||||||
{
|
{
|
||||||
!isLatest && !IS_CE_EDITION && (
|
!isLatest && !IS_CE_EDITION && (
|
||||||
|
<Button variant='primary'>
|
||||||
<Link
|
<Link
|
||||||
className={classNames(buttonClassName, 'text-primary-600')}
|
|
||||||
href={langeniusVersionInfo.release_notes}
|
href={langeniusVersionInfo.release_notes}
|
||||||
target='_blank' rel='noopener noreferrer'
|
target='_blank' rel='noopener noreferrer'
|
||||||
>
|
>
|
||||||
{t('common.about.updateNow')}
|
{t('common.about.updateNow')}
|
||||||
</Link>
|
</Link>
|
||||||
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user