mirror of
https://github.com/langgenius/dify.git
synced 2026-11-12 14:21:29 +08:00
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: hjlarry <hjlarry@163.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: zhaohao1004 <zhaohao1004@gmail.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: FFXN <lizy@dify.ai>
20 lines
560 B
TypeScript
20 lines
560 B
TypeScript
'use client'
|
|
|
|
import { atom } from 'jotai'
|
|
import { atomWithResolvedSuspenseQuery } from '@/utils/query-atoms'
|
|
import { systemFeaturesQueryOptions } from './client'
|
|
|
|
const systemFeaturesQueryAtom = atomWithResolvedSuspenseQuery(() => systemFeaturesQueryOptions())
|
|
|
|
const systemFeaturesAtom = atom((get) => {
|
|
return get(systemFeaturesQueryAtom).data
|
|
})
|
|
|
|
export const deploymentEditionAtom = atom((get) => {
|
|
return get(systemFeaturesAtom).deployment_edition
|
|
})
|
|
|
|
export const rbacEnabledAtom = atom((get) => {
|
|
return get(systemFeaturesAtom).rbac_enabled
|
|
})
|