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={{
|
|
|
|
'oidc-manager': {
|
|
|
|
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>
|
|
|
|
);
|
|
|
|
}
|