mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
* feat(api-keys): the expiration field support custom option * feat: support never option * feat: support if expiresIn = never the expiresIn will replace to 1000y * fix: toggle datepicker * feat: update syntax * fix: option order * docs: update * fix: maskCloseable should be false * refactor: performance and remove unused code * feat: should not allow clear * fix: decode maybe fail * fix: i18n
19 lines
705 B
TypeScript
19 lines
705 B
TypeScript
import { RecursionField } from '@formily/react';
|
|
import { CollectionManagerProvider, SchemaComponentOptions, useCurrentRoles } from '@nocobase/client';
|
|
import React from 'react';
|
|
import { apiKeysCollection } from '../../collections';
|
|
import { ExpiresSelect } from './ExpiresSelect';
|
|
import { configurationSchema } from './schema';
|
|
|
|
export const Configuration = () => {
|
|
const currentRoles = useCurrentRoles();
|
|
|
|
return (
|
|
<CollectionManagerProvider collections={[apiKeysCollection]}>
|
|
<SchemaComponentOptions scope={{ currentRoles }} components={{ ExpiresSelect }}>
|
|
<RecursionField schema={configurationSchema} />
|
|
</SchemaComponentOptions>
|
|
</CollectionManagerProvider>
|
|
);
|
|
};
|