Skip to content

Commit

Permalink
Merge branch 'main' into txs
Browse files Browse the repository at this point in the history
  • Loading branch information
apotdevin committed Oct 7, 2024
2 parents 147d945 + 898631f commit b2707c7
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 239 deletions.
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"plain": "The password hint will be stored in plain text. Avoid using your full password as a hint!",
"referral": "Referral Code",
"save": "Please save your password as it cannot be recovered if lost.",
"security": "The password is your responsibility to keep safe. You may want to consider using a password manager. <learn>Learn more</learn> about BancoLibre security practices.",
"set": "Set a password",
"submit": "Create Account"
},
Expand Down
1 change: 1 addition & 0 deletions messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"plain": "El recordatorio para la contraseña se guarda sin encripción. Evita usar la misma contraseña como recordatorio!",
"referral": "Código de Invitación",
"save": "Por favór guarda la contraseña. No se puede recuperar si se pierde.",
"security": "Es su responsabilidad mantener la contraseña segura. Recomendamos el uso de un administrador de contraseñas. <learn>Aprende más</learn> sobre las practicas de seguridad de BancoLibre.",
"set": "Crea una contraseña",
"submit": "Crea una cuenta"
},
Expand Down
19 changes: 11 additions & 8 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getLocale, getMessages } from 'next-intl/server';
import PlausibleProvider from 'next-plausible';

import { Toaster } from '@/components/ui/toaster';
import { TooltipProvider } from '@/components/ui/tooltip';
import { ApolloWrapper } from '@/lib/apollo/wrapper';
import { ThemeProvider } from '@/lib/themes/wrapper';

Expand Down Expand Up @@ -55,14 +56,16 @@ export default async function RootLayout({
enableSystem
disableTransitionOnChange
>
<ApolloWrapper
serverUrl={serverUrl}
accessToken={accessToken}
refreshToken={refreshToken}
>
{children}
<Toaster />
</ApolloWrapper>
<TooltipProvider>
<ApolloWrapper
serverUrl={serverUrl}
accessToken={accessToken}
refreshToken={refreshToken}
>
{children}
<Toaster />
</ApolloWrapper>
</TooltipProvider>
</ThemeProvider>
</NextIntlClientProvider>
</body>
Expand Down
29 changes: 27 additions & 2 deletions src/components/form/SignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { ApolloError, useApolloClient } from '@apollo/client';
import stringEntropy from 'fast-password-entropy';
import { ArrowLeft, Eye, EyeOff, Loader2 } from 'lucide-react';
import { ArrowLeft, Eye, EyeOff, Info, Loader2 } from 'lucide-react';
import Link from 'next/link';
import { useSearchParams } from 'next/navigation';
import { useTranslations } from 'next-intl';
Expand All @@ -24,6 +24,7 @@ import { Button } from '../ui/button-v2';
import { Checkbox } from '../ui/checkbox';
import { Label } from '../ui/label';
import { Progress } from '../ui/progress';
import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip';
import { useToast } from '../ui/use-toast';
import { WaitlistForm } from './WaitlistForm';

Expand Down Expand Up @@ -264,7 +265,31 @@ export function SignUpForm() {

<div className="space-y-4">
<div className="space-y-2">
<Label htmlFor="password">{c('password')}</Label>
<div className="flex items-center space-x-2">
<Label htmlFor="password">{c('password')}</Label>

<Tooltip>
<TooltipTrigger asChild>
<button type="button">
<Info size={16} />
</button>
</TooltipTrigger>

<TooltipContent className="w-72">
{s.rich('security', {
learn: chunks => (
<Link
href={ROUTES.docs.security}
target="_blank"
className="underline underline-offset-2"
>
{chunks}
</Link>
),
})}
</TooltipContent>
</Tooltip>
</div>

<div className="flex items-center gap-2">
<Input
Expand Down
Loading

0 comments on commit b2707c7

Please sign in to comment.