| | |
| | | return ( |
| | | <div className='rounded-[10px] border border-divider-subtle bg-chat-bubble-bg'> |
| | | <div |
| | | className={cn('flex cursor-pointer items-center gap-1 border-b border-divider-subtle px-3 pb-2 pt-2.5 text-text-secondary', isCollapse && 'border-0 pb-2.5')} |
| | | className={cn('flex items-center gap-1 px-3 pt-2.5 pb-2 border-b border-divider-subtle text-text-secondary cursor-pointer', isCollapse && 'pb-2.5 border-0')} |
| | | onClick={toggleCollapse} |
| | | > |
| | | <Variable02 className='h-4 w-4' /> |
| | | <div className='system-md-medium grow'>{t('appLog.detail.variables')}</div> |
| | | <Variable02 className='w-4 h-4' /> |
| | | <div className='grow system-md-medium'>{t('appLog.detail.variables')}</div> |
| | | { |
| | | isCollapse |
| | | ? <RiArrowRightSLine className='h-4 w-4' /> |
| | | : <RiArrowDownSLine className='h-4 w-4' /> |
| | | ? <RiArrowRightSLine className='w-4 h-4' /> |
| | | : <RiArrowDownSLine className='w-4 h-4' /> |
| | | } |
| | | </div> |
| | | {!isCollapse && ( |
| | | <div className='flex max-h-[500px] flex-col gap-2 overflow-y-auto p-3'> |
| | | <div className='p-3 flex flex-col gap-2 max-h-[500px] overflow-y-auto'> |
| | | {varList.map(({ label, value }, index) => ( |
| | | <div key={index} className='system-xs-medium flex py-2'> |
| | | <div className='flex w-[128px] shrink-0 text-text-accent'> |
| | | <div key={index} className='flex py-2 system-xs-medium'> |
| | | <div className='shrink-0 w-[128px] flex text-text-accent'> |
| | | <span className='shrink-0 opacity-60'>{'{{'}</span> |
| | | <span className='truncate'>{label}</span> |
| | | <span className='shrink-0 opacity-60'>{'}}'}</span> |
| | | </div> |
| | | <div className='whitespace-pre-wrap pl-2.5 text-text-secondary'>{value}</div> |
| | | <div className='pl-2.5 whitespace-pre-wrap text-text-secondary'>{value}</div> |
| | | </div> |
| | | ))} |
| | | |
| | | {message_files.length > 0 && ( |
| | | <div className='mt-1 flex py-2'> |
| | | <div className='system-xs-medium w-[128px] shrink-0 text-text-tertiary'>{t('appLog.detail.uploadImages')}</div> |
| | | <div className='shrink-0 w-[128px] system-xs-medium text-text-tertiary'>{t('appLog.detail.uploadImages')}</div> |
| | | <div className="flex space-x-2"> |
| | | {message_files.map((url, index) => ( |
| | | <div |
| | | key={index} |
| | | className="ml-2.5 h-16 w-16 cursor-pointer rounded-lg bg-cover bg-center bg-no-repeat" |
| | | className="ml-2.5 w-16 h-16 rounded-lg bg-no-repeat bg-cover bg-center cursor-pointer" |
| | | style={{ backgroundImage: `url(${url})` }} |
| | | onClick={() => setImagePreviewUrl(url)} |
| | | /> |