mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
feat: page holder
This commit is contained in:
@ -0,0 +1,26 @@
|
|||||||
|
'use client'
|
||||||
|
import type { FC } from 'react'
|
||||||
|
import React from 'react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
const i18nPrefix = 'app.checkLegacy'
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
appNum: number,
|
||||||
|
publishedNum: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
const Header: FC<Props> = ({
|
||||||
|
appNum,
|
||||||
|
publishedNum,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className='title-2xl-semi-bold text-text-primary'>{t(`${i18nPrefix}.title`)}</div>
|
||||||
|
<div className='system-md-regular mt-1 text-text-tertiary'>{t(`${i18nPrefix}.description`, { num: appNum, publishedNum })}</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default React.memo(Header)
|
||||||
28
web/app/(commonLayout)/apps/check-legacy/components/list.tsx
Normal file
28
web/app/(commonLayout)/apps/check-legacy/components/list.tsx
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
'use client'
|
||||||
|
import type { FC } from 'react'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
list: any[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const List: FC<Props> = ({
|
||||||
|
list,
|
||||||
|
}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{list.length > 0 ? (
|
||||||
|
<ul className='list-disc pl-5'>
|
||||||
|
{list.map((item, index) => (
|
||||||
|
<li key={index} className='system-md-regular text-text-primary'>
|
||||||
|
{item}
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
<div className='system-md-regular text-text-secondary'>No items found</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default React.memo(List)
|
||||||
@ -1,7 +1,17 @@
|
|||||||
|
'use client'
|
||||||
|
import Header from './components/header'
|
||||||
|
// TODO: Filter
|
||||||
|
import List from './components/list'
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
return (<>
|
return (
|
||||||
<div>Check legacy page</div>
|
<div>
|
||||||
</>)
|
<Header appNum={5} publishedNum={3}/>
|
||||||
|
<div>
|
||||||
|
<List list={[]} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Page
|
export default Page
|
||||||
|
|||||||
@ -233,6 +233,10 @@ const translation = {
|
|||||||
notSetDesc: 'Currently nobody can access the web app. Please set permissions.',
|
notSetDesc: 'Currently nobody can access the web app. Please set permissions.',
|
||||||
},
|
},
|
||||||
noAccessPermission: 'No permission to access web app',
|
noAccessPermission: 'No permission to access web app',
|
||||||
|
checkLegacy: {
|
||||||
|
title: 'Apps affected by image upload legacy',
|
||||||
|
description: 'The current workspace has {{num}} applications affected, {{publishedNum}} of which have been published.',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translation
|
export default translation
|
||||||
|
|||||||
@ -234,6 +234,10 @@ const translation = {
|
|||||||
notSetDesc: '当前任何人都无法访问 Web 应用。请设置访问权限。',
|
notSetDesc: '当前任何人都无法访问 Web 应用。请设置访问权限。',
|
||||||
},
|
},
|
||||||
noAccessPermission: '没有权限访问 web 应用',
|
noAccessPermission: '没有权限访问 web 应用',
|
||||||
|
checkLegacy: {
|
||||||
|
title: '受图像上传遗留问题影响的应用',
|
||||||
|
description: '当前工作区有 {{num}} 个应用受图像上传遗留问题影响,其中 {{publishedNum}} 个已发布。',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translation
|
export default translation
|
||||||
|
|||||||
Reference in New Issue
Block a user