diff --git a/studio/components/interfaces/Auth/AuthProvidersForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm.tsx new file mode 100644 index 00000000000..11b5c56551d --- /dev/null +++ b/studio/components/interfaces/Auth/AuthProvidersForm.tsx @@ -0,0 +1,309 @@ +import { + Alert, + Button, + Collapsible, + Form, + IconCheck, + IconChevronUp, + Input, + Listbox, + Toggle, + Menu, +} from '@supabase/ui' +import { useStore } from 'hooks' +import { observer } from 'mobx-react-lite' +import { useState } from 'react' +import ReactMarkdown from 'react-markdown' +import { PROVIDERS_SCHEMAS } from 'stores/authConfig/schema' + +interface Enum { + label: string + value: string + icon: string +} +interface Provider { + $schema: string + type: 'object' + title: string + properties: { + [x: string]: { + title: string + type: 'boolean' | 'string' | 'select' + description?: string + descriptionOptional?: string + enum: Enum[] + show: { + key: string + matches: string + } + } + } + validationSchema: any // todo: use Yup type + misc: { + iconKey: 'gitlab-icon' + requiresRedirect: true + helper: string + alert: { + title: string + description: string + } + } +} + +const AuthProvidersForm = () => { + const providers = PROVIDERS_SCHEMAS + + return ( +
Error connecting to API
+ //{`${error}`}
+ // + // ) + // } + + // console.log(config) + + // useEffect(() => { + // if (config) { + // const temp = + // config.SMTP_ADMIN_EMAIL || + // config.SMTP_HOST || + // config.SMTP_PORT || + // config.SMTP_USER || + // config.SMTP_PASS + // setCustomSMTP(temp) + // } + // setModel({ ...config }) + // setExternalProvidersModel({ ...config }) + // }, [config]) + + if (authConfig) + return ( ++ Turn payment methods on and off in one click – no engineering time required. +
++ Use our guide to check which payment methods are compatible with your integration. +
+- Turn payment methods on and off in one click – no engineering time required. -
-- Use our guide to check which payment methods are compatible with your integration. -
-