演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
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
|
|
})
|