2022-11-29 23:18:21 +08:00
|
|
|
import { PluginManagerContext, SettingsCenterProvider, SigninPageExtensionProvider } from '@nocobase/client';
|
|
|
|
import React, { useContext } from 'react';
|
|
|
|
import { useOidcTranslation } from './locale';
|
|
|
|
import { OIDCList } from './OIDCList';
|
|
|
|
import { OIDCPanel } from './OIDCPanel';
|
|
|
|
|
|
|
|
export default function (props) {
|
|
|
|
const { t } = useOidcTranslation();
|
|
|
|
const ctx = useContext(PluginManagerContext);
|
|
|
|
return (
|
|
|
|
<SigninPageExtensionProvider component={OIDCList}>
|
|
|
|
<SettingsCenterProvider
|
|
|
|
settings={{
|
2023-04-12 12:24:09 +08:00
|
|
|
oidc: {
|
2022-11-29 23:18:21 +08:00
|
|
|
title: t('OIDC manager'),
|
|
|
|
icon: 'FileOutlined',
|
|
|
|
tabs: {
|
2023-01-09 07:35:48 +08:00
|
|
|
providers: {
|
2022-11-29 23:18:21 +08:00
|
|
|
title: t('OIDC Providers'),
|
|
|
|
component: OIDCPanel,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<PluginManagerContext.Provider
|
|
|
|
value={{
|
|
|
|
components: {
|
|
|
|
...ctx?.components,
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{props.children}
|
|
|
|
</PluginManagerContext.Provider>
|
|
|
|
</SettingsCenterProvider>
|
|
|
|
</SigninPageExtensionProvider>
|
|
|
|
);
|
|
|
|
}
|