mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-25 07:38:15 +08:00

Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: GareArc <chen4851@purdue.edu> Co-authored-by: Byron.wang <byron@dify.ai> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Garfield Dai <dai.hai@foxmail.com> Co-authored-by: KVOJJJin <jzongcode@gmail.com> Co-authored-by: Alexi.F <654973939@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com> Co-authored-by: kautsar_masuara <61046989+izon-masuara@users.noreply.github.com> Co-authored-by: achmad-kautsar <achmad.kautsar@insignia.co.id> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: kelvintsim <83445753+kelvintsim@users.noreply.github.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: Zixuan Cheng <61724187+Theysua@users.noreply.github.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import React from 'react'
|
|
import cn from 'classnames'
|
|
import Modal from '@/app/components/base/modal'
|
|
import AppIcon from '@/app/components/base/app-icon'
|
|
import type { SiteInfo } from '@/models/share'
|
|
import { appDefaultIconBackground } from '@/config'
|
|
|
|
type Props = {
|
|
data?: SiteInfo
|
|
isShow: boolean
|
|
onClose: () => void
|
|
}
|
|
|
|
const InfoModal = ({
|
|
isShow,
|
|
onClose,
|
|
data,
|
|
}: Props) => {
|
|
return (
|
|
<Modal
|
|
isShow={isShow}
|
|
onClose={onClose}
|
|
className='min-w-[400px] max-w-[400px] !p-0'
|
|
closable
|
|
>
|
|
<div className={cn('flex flex-col items-center gap-4 px-4 pb-8 pt-10')}>
|
|
<AppIcon
|
|
size='xxl'
|
|
iconType={data?.icon_type}
|
|
icon={data?.icon}
|
|
background={data?.icon_background || appDefaultIconBackground}
|
|
imageUrl={data?.icon_url}
|
|
/>
|
|
<div className='system-xl-semibold text-text-secondary'>{data?.title}</div>
|
|
<div className='system-xs-regular text-text-tertiary'>
|
|
{/* copyright */}
|
|
{data?.copyright && (
|
|
<div>© {(new Date()).getFullYear()} {data?.copyright}</div>
|
|
)}
|
|
{data?.custom_disclaimer && (
|
|
<div className='mt-2'>{data.custom_disclaimer}</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
)
|
|
}
|
|
|
|
export default InfoModal
|