docs: 📝 Update env var and write Configuration doc
This commit is contained in:
@@ -52,26 +52,30 @@ export const SignInForm = ({
|
||||
return (
|
||||
<Stack spacing="4">
|
||||
<SocialLoginButtons />
|
||||
<DividerWithText mt="6">Or with your email</DividerWithText>
|
||||
<HStack as="form" onSubmit={handleEmailSubmit}>
|
||||
<Input
|
||||
name="email"
|
||||
type="email"
|
||||
autoComplete="email"
|
||||
placeholder="email@company.com"
|
||||
required
|
||||
value={emailValue}
|
||||
onChange={handleEmailChange}
|
||||
/>
|
||||
<Button
|
||||
type="submit"
|
||||
isLoading={
|
||||
['loading', 'authenticated'].includes(status) || authLoading
|
||||
}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</HStack>
|
||||
{process.env.NEXT_PUBLIC_SMTP_FROM && (
|
||||
<>
|
||||
<DividerWithText mt="6">Or with your email</DividerWithText>
|
||||
<HStack as="form" onSubmit={handleEmailSubmit}>
|
||||
<Input
|
||||
name="email"
|
||||
type="email"
|
||||
autoComplete="email"
|
||||
placeholder="email@company.com"
|
||||
required
|
||||
value={emailValue}
|
||||
onChange={handleEmailChange}
|
||||
/>
|
||||
<Button
|
||||
type="submit"
|
||||
isLoading={
|
||||
['loading', 'authenticated'].includes(status) || authLoading
|
||||
}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</HStack>
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,24 +36,28 @@ export const SocialLoginButtons = () => {
|
||||
>
|
||||
Continue with GitHub
|
||||
</Button>
|
||||
<Button
|
||||
leftIcon={<GoogleLogo />}
|
||||
onClick={handleGoogleClick}
|
||||
data-testid="google"
|
||||
isLoading={['loading', 'authenticated'].includes(status)}
|
||||
variant="outline"
|
||||
>
|
||||
Continue with Google
|
||||
</Button>
|
||||
<Button
|
||||
leftIcon={<FacebookLogo />}
|
||||
onClick={handleFacebookClick}
|
||||
data-testid="facebook"
|
||||
isLoading={['loading', 'authenticated'].includes(status)}
|
||||
variant="outline"
|
||||
>
|
||||
Continue with Facebook
|
||||
</Button>
|
||||
{process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID && (
|
||||
<Button
|
||||
leftIcon={<GoogleLogo />}
|
||||
onClick={handleGoogleClick}
|
||||
data-testid="google"
|
||||
isLoading={['loading', 'authenticated'].includes(status)}
|
||||
variant="outline"
|
||||
>
|
||||
Continue with Google
|
||||
</Button>
|
||||
)}
|
||||
{process.env.NEXT_PUBLIC_FACEBOOK_CLIENT_ID && (
|
||||
<Button
|
||||
leftIcon={<FacebookLogo />}
|
||||
onClick={handleFacebookClick}
|
||||
data-testid="facebook"
|
||||
isLoading={['loading', 'authenticated'].includes(status)}
|
||||
variant="outline"
|
||||
>
|
||||
Continue with Facebook
|
||||
</Button>
|
||||
)}
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export const ShareContent = () => {
|
||||
{typebot && (
|
||||
<EditableUrl
|
||||
hostname={
|
||||
process.env.NEXT_PUBLIC_VIEWER_HOST ?? 'https://typebot.io'
|
||||
process.env.NEXT_PUBLIC_VIEWER_URL ?? 'https://typebot.io'
|
||||
}
|
||||
pathname={publicId}
|
||||
onPathnameChange={handlePublicIdChange}
|
||||
|
||||
@@ -20,7 +20,9 @@ export const SpreadsheetsDropdown = ({
|
||||
})
|
||||
const { spreadsheets, isLoading } = useSpreadsheets({
|
||||
credentialsId,
|
||||
onError: (e) => toast({ title: e.name, description: e.message }),
|
||||
onError: (e) =>
|
||||
!toast.isActive('spreadsheets') &&
|
||||
toast({ id: 'spreadsheets', title: e.name, description: e.message }),
|
||||
})
|
||||
const currentSpreadsheet = useMemo(
|
||||
() => spreadsheets?.find((s) => s.id === spreadsheetId),
|
||||
|
||||
@@ -69,9 +69,9 @@ export const SendEmailSettings = ({ options, onOptionsChange }: Props) => {
|
||||
currentCredentialsId={options.credentialsId}
|
||||
onCredentialsSelect={handleCredentialsSelect}
|
||||
onCreateNewClick={onOpen}
|
||||
defaultCredentialLabel={
|
||||
process.env.NEXT_PUBLIC_EMAIL_NOTIFICATIONS_FROM_EMAIL
|
||||
}
|
||||
defaultCredentialLabel={process.env.NEXT_PUBLIC_SMTP_FROM?.match(
|
||||
/\<(.*)\>/
|
||||
)?.pop()}
|
||||
refreshDropdownKey={refreshCredentialsKey}
|
||||
/>
|
||||
</Stack>
|
||||
|
||||
@@ -78,7 +78,6 @@ export const SmtpConfigModal = ({
|
||||
<ModalFooter>
|
||||
<Button
|
||||
colorScheme="blue"
|
||||
mr={3}
|
||||
onClick={handleCreateClick}
|
||||
isDisabled={
|
||||
isNotDefined(smtpConfig.from.email) ||
|
||||
@@ -91,7 +90,6 @@ export const SmtpConfigModal = ({
|
||||
>
|
||||
Create
|
||||
</Button>
|
||||
<Button variant="ghost">Close</Button>
|
||||
</ModalFooter>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useTypebot } from 'contexts/TypebotContext'
|
||||
import { useUser } from 'contexts/UserContext'
|
||||
import { Plan } from 'db'
|
||||
import React, { useEffect } from 'react'
|
||||
import { isCloudProdInstance } from 'services/utils'
|
||||
import { initBubble } from 'typebot-js'
|
||||
|
||||
export const SupportBubble = () => {
|
||||
@@ -9,20 +10,21 @@ export const SupportBubble = () => {
|
||||
const { user } = useUser()
|
||||
|
||||
useEffect(() => {
|
||||
initBubble({
|
||||
publishId: 'typebot-support',
|
||||
viewerHost: process.env.NEXT_PUBLIC_VIEWER_HOST,
|
||||
backgroundColor: '#ffffff',
|
||||
button: { color: '#0042DA' },
|
||||
hiddenVariables: {
|
||||
'User ID': user?.id,
|
||||
Name: user?.name ?? undefined,
|
||||
Email: user?.email ?? undefined,
|
||||
'Typebot ID': typebot?.id,
|
||||
'Avatar URL': user?.image ?? undefined,
|
||||
Plan: planToReadable(user?.plan),
|
||||
},
|
||||
})
|
||||
if (isCloudProdInstance())
|
||||
initBubble({
|
||||
publishId: 'typebot-support',
|
||||
viewerHost: process.env.NEXT_PUBLIC_VIEWER_URL,
|
||||
backgroundColor: '#ffffff',
|
||||
button: { color: '#0042DA' },
|
||||
hiddenVariables: {
|
||||
'User ID': user?.id,
|
||||
Name: user?.name ?? undefined,
|
||||
Email: user?.email ?? undefined,
|
||||
'Typebot ID': typebot?.id,
|
||||
'Avatar URL': user?.image ?? undefined,
|
||||
Plan: planToReadable(user?.plan),
|
||||
},
|
||||
})
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [user, typebot])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user