* feat(plugin-verification): add client config * feat(plugin-verification): add config ui * fix(plugin-verification): fix schema * refactor(plugin-verification): add default for verification providers * fix(plugin-users): fix initVerification in lifecycle * fix(plugin-users): fix initVerification in lifecycle * fix(plugin-verification): fix locale and default provider * fix(plugin-verification): fix test case * fix(plugin-verification): fix locale
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import React, { useContext } from 'react';
|
|
|
|
import { PluginManagerContext, SettingsCenterProvider } from '@nocobase/client';
|
|
|
|
import { NAMESPACE } from './locale';
|
|
|
|
import { VerificationProviders } from './VerificationProviders';
|
|
|
|
export { default as verificationProviderTypes } from './providerTypes';
|
|
|
|
export default function(props) {
|
|
const ctx = useContext(PluginManagerContext);
|
|
return (
|
|
<SettingsCenterProvider
|
|
settings={{
|
|
verification: {
|
|
icon: 'CheckCircleOutlined',
|
|
title: `{{t("Verification", { ns: "${NAMESPACE}" })}}`,
|
|
tabs: {
|
|
providers: {
|
|
title: `{{t("Verification providers", { ns: "${NAMESPACE}" })}}`,
|
|
component: VerificationProviders,
|
|
},
|
|
},
|
|
},
|
|
}}
|
|
>
|
|
<PluginManagerContext.Provider
|
|
value={{
|
|
components: {
|
|
...ctx?.components,
|
|
},
|
|
}}
|
|
>
|
|
{props.children}
|
|
</PluginManagerContext.Provider>
|
|
</SettingsCenterProvider>
|
|
);
|
|
};
|
|
|
|
|