mirror of https://github.com/langgenius/dify.git
chore: add banner permission
This commit is contained in:
parent
84b2913cd9
commit
487eac3b91
|
|
@ -24,6 +24,7 @@ import { useImportDSL } from '@/hooks/use-import-dsl'
|
|||
import DSLConfirmModal from '@/app/components/app/create-from-dsl-modal/dsl-confirm-modal'
|
||||
import Banner from '../banner'
|
||||
import Button from '../../base/button'
|
||||
import { useGlobalPublicStore } from '@/context/global-public-context'
|
||||
|
||||
type AppsProps = {
|
||||
onSuccess?: () => void
|
||||
|
|
@ -38,6 +39,7 @@ const Apps = ({
|
|||
onSuccess,
|
||||
}: AppsProps) => {
|
||||
const { t } = useTranslation()
|
||||
const { systemFeatures } = useGlobalPublicStore()
|
||||
const { hasEditPermission } = useContext(ExploreContext)
|
||||
const allCategoriesEn = t('explore.apps.allCategories', { lng: 'en' })
|
||||
|
||||
|
|
@ -151,9 +153,11 @@ const Apps = ({
|
|||
<div className={cn(
|
||||
'flex h-full flex-col border-l-[0.5px] border-divider-regular',
|
||||
)}>
|
||||
<div className='mt-4 px-12'>
|
||||
<Banner />
|
||||
</div>
|
||||
{systemFeatures.enable_explore_banner && (
|
||||
<div className='mt-4 px-12'>
|
||||
<Banner />
|
||||
</div>
|
||||
)}
|
||||
<div className={cn(
|
||||
'mt-6 flex items-center justify-between px-12',
|
||||
)}>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ export type SystemFeatures = {
|
|||
allow_email_code_login: boolean
|
||||
allow_email_password_login: boolean
|
||||
}
|
||||
enable_trial_app: boolean
|
||||
enable_explore_banner: boolean
|
||||
}
|
||||
|
||||
export const defaultSystemFeatures: SystemFeatures = {
|
||||
|
|
@ -98,6 +100,8 @@ export const defaultSystemFeatures: SystemFeatures = {
|
|||
allow_email_code_login: false,
|
||||
allow_email_password_login: false,
|
||||
},
|
||||
enable_trial_app: false,
|
||||
enable_explore_banner: false,
|
||||
}
|
||||
|
||||
export enum DatasetAttr {
|
||||
|
|
|
|||
Loading…
Reference in New Issue