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