mirror of https://github.com/langgenius/dify.git
mrege
This commit is contained in:
commit
ff40efdc26
|
|
@ -24,6 +24,7 @@ import NotionConnector from '@/app/components/base/notion-connector'
|
|||
import type { DataSourceAuth } from '@/app/components/header/account-setting/data-source-page-new/types'
|
||||
import PlanUpgradeModal from '@/app/components/billing/plan-upgrade-modal'
|
||||
import { useBoolean } from 'ahooks'
|
||||
import { Plan } from '@/app/components/billing/type'
|
||||
|
||||
type IStepOneProps = {
|
||||
datasetId?: string
|
||||
|
|
@ -112,7 +113,7 @@ const StepOne = ({
|
|||
const hasNotin = notionPages.length > 0
|
||||
const isVectorSpaceFull = plan.usage.vectorSpace >= plan.total.vectorSpace
|
||||
const isShowVectorSpaceFull = (allFileLoaded || hasNotin) && isVectorSpaceFull && enableBilling
|
||||
const supportBatchUpload = !enableBilling || plan.type !== 'sandbox'
|
||||
const supportBatchUpload = !enableBilling || plan.type !== Plan.sandbox
|
||||
const notSupportBatchUpload = !supportBatchUpload
|
||||
|
||||
const [isShowPlanUpgradeModal, {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const SegmentAdd: FC<ISegmentAddProps> = ({
|
|||
}] = useBoolean(false)
|
||||
const { plan, enableBilling } = useProviderContext()
|
||||
const { usage, total } = plan
|
||||
const canAdd = enableBilling && (usage.vectorSpace < total.vectorSpace)
|
||||
const canAdd = enableBilling ? (usage.vectorSpace < total.vectorSpace) : true
|
||||
|
||||
const withNeedUpgradeCheck = useCallback((fn: () => void) => {
|
||||
return () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue